aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers-qmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-modem-helpers-qmi.c')
-rw-r--r--src/mm-modem-helpers-qmi.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mm-modem-helpers-qmi.c b/src/mm-modem-helpers-qmi.c
index b0177933..ce3967f3 100644
--- a/src/mm-modem-helpers-qmi.c
+++ b/src/mm-modem-helpers-qmi.c
@@ -1842,9 +1842,17 @@ mm_current_capability_from_qmi_current_capabilities_context (MMQmiCurrentCapabil
g_autofree gchar *tmp_str = NULL;
/* If not a multimode device, we're done */
- if (!ctx->multimode)
- tmp = ctx->dms_capabilities;
- else {
+ if (!ctx->multimode) {
+ if (ctx->dms_capabilities != MM_MODEM_CAPABILITY_NONE)
+ tmp = ctx->dms_capabilities;
+ /* SSP logic to gather capabilities uses the Mode Preference TLV if available */
+ else if (ctx->nas_ssp_mode_preference_mask)
+ tmp = mm_modem_capability_from_qmi_rat_mode_preference (ctx->nas_ssp_mode_preference_mask);
+ /* If no value retrieved from SSP, check TP. We only process TP
+ * values if not 'auto' (0). */
+ else if (ctx->nas_tp_mask != QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO)
+ tmp = mm_modem_capability_from_qmi_radio_technology_preference (ctx->nas_tp_mask);
+ } else {
/* We have a multimode CDMA/EVDO+GSM/UMTS device, check SSP and TP */
/* SSP logic to gather capabilities uses the Mode Preference TLV if available */