diff options
author | Sven Schwermer <sven.schwermer@disruptive-technologies.com> | 2022-03-30 08:37:53 +0200 |
---|---|---|
committer | Sven Schwermer <sven.schwermer@disruptive-technologies.com> | 2022-03-30 10:19:09 +0200 |
commit | 210fa8bf354f5455a4e75dadbf69e72940b19d70 (patch) | |
tree | df5902ca81c114120ea254ac9b17e4646e1e29eb /src/mm-modem-helpers-qmi.c | |
parent | 0fbab3c8dc82be0e764d72dd5236c86501deac58 (diff) |
qmi: Fall back to NAS SSP/NAS TP capabilities
If no DMS capabilities are reported, we fall back to the capabilities
reported by NAS SSP or NAS TP.
Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
Diffstat (limited to 'src/mm-modem-helpers-qmi.c')
-rw-r--r-- | src/mm-modem-helpers-qmi.c | 14 |
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 */ |