aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers-qmi.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-05-29 17:52:28 +0200
committerAleksander Morgado <aleksander@lanedo.com>2013-06-05 19:15:15 +0200
commitda606ef572eeca18af14d04cbcb94f7e7c7eb474 (patch)
tree9ecbdd8e26b5ad12cb75119e7dd146d4a27b0a61 /src/mm-modem-helpers-qmi.c
parent83a8e08c3714ce92483e4cba549dcb7e65846b87 (diff)
broadband-modem-qmi: update current capabilities loading logic
Changes being: * Don't rely on the band preference TLVs presence. The band preference TLVs are always given, even if the modem doesn't support the specific capability right away. E.g. a GSM/UMTS/LTE modem configured with 'gsm-umts' capability (no 'lte') still shows the LTE band preference TLV in the SSP responses. * Don't automatically add LTE as current capability. We needed this when we were not able to change capabilities, so that we didn't lose the ability to set 4G mode as allowed.
Diffstat (limited to 'src/mm-modem-helpers-qmi.c')
-rw-r--r--src/mm-modem-helpers-qmi.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/mm-modem-helpers-qmi.c b/src/mm-modem-helpers-qmi.c
index c1c36bb3..f8832a73 100644
--- a/src/mm-modem-helpers-qmi.c
+++ b/src/mm-modem-helpers-qmi.c
@@ -1225,8 +1225,6 @@ mm_modem_capability_from_qmi_capabilities_context (MMQmiCapabilitiesContext *ctx
{
MMModemCapability tmp = MM_MODEM_CAPABILITY_NONE;
gchar *nas_ssp_mode_preference_str;
- gchar *nas_ssp_band_preference_str;
- gchar *nas_ssp_lte_band_preference_str;
gchar *nas_tp_str;
gchar *dms_capabilities_str;
gchar *tmp_str;
@@ -1235,12 +1233,6 @@ mm_modem_capability_from_qmi_capabilities_context (MMQmiCapabilitiesContext *ctx
* and if not available it falls back to using Band Preference TLVs */
if (ctx->nas_ssp_mode_preference_mask)
tmp = mm_modem_capability_from_qmi_rat_mode_preference (ctx->nas_ssp_mode_preference_mask);
- else if (ctx->nas_ssp_band_preference_mask) {
- tmp = mm_modem_capability_from_qmi_band_preference (ctx->nas_ssp_band_preference_mask);
- /* Just the presence of the LTE band preference tells us it's LTE */
- if (ctx->nas_ssp_lte_band_preference_mask)
- tmp |= MM_MODEM_CAPABILITY_LTE;
- }
/* If no value retrieved from SSP, check TP. We only process TP
* values if not 'auto'. */
@@ -1259,34 +1251,20 @@ mm_modem_capability_from_qmi_capabilities_context (MMQmiCapabilitiesContext *ctx
else
tmp &= ctx->dms_capabilities;
- /* Modems which have 'LTE' capability reported by DMS will always have it
- * reported in 'current capabilities', even if it may not be currently
- * allowed (i.e. not selected in 'allowed-modes') */
- if (ctx->dms_capabilities & MM_MODEM_CAPABILITY_LTE)
- tmp |= MM_MODEM_CAPABILITY_LTE;
-
/* Log about the logic applied */
nas_ssp_mode_preference_str = qmi_nas_rat_mode_preference_build_string_from_mask (ctx->nas_ssp_mode_preference_mask);
- nas_ssp_band_preference_str = qmi_nas_band_preference_build_string_from_mask (ctx->nas_ssp_band_preference_mask);
- nas_ssp_lte_band_preference_str = qmi_nas_lte_band_preference_build_string_from_mask (ctx->nas_ssp_band_preference_mask);
nas_tp_str = qmi_nas_radio_technology_preference_build_string_from_mask (ctx->nas_tp_mask);
dms_capabilities_str = mm_modem_capability_build_string_from_mask (ctx->dms_capabilities);
tmp_str = mm_modem_capability_build_string_from_mask (tmp);
mm_dbg ("Current capabilities built: '%s'\n"
" SSP mode preference: '%s'\n"
- " SSP band preference: '%s'\n"
- " SSP LTE band preference: '%s'\n"
" TP: '%s'\n"
" DMS Capabilities: '%s'",
tmp_str,
nas_ssp_mode_preference_str ? nas_ssp_mode_preference_str : "unknown",
- nas_ssp_band_preference_str ? nas_ssp_band_preference_str : "unknown",
- nas_ssp_lte_band_preference_str ? nas_ssp_lte_band_preference_str : "unknown",
nas_tp_str ? nas_tp_str : "unknown",
dms_capabilities_str);
g_free (nas_ssp_mode_preference_str);
- g_free (nas_ssp_band_preference_str);
- g_free (nas_ssp_lte_band_preference_str);
g_free (nas_tp_str);
g_free (dms_capabilities_str);
g_free (tmp_str);