diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-03-25 16:14:48 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-04-09 12:38:50 +0000 |
commit | c9ee47dd8f49ff24ce4244afbd44473f03a78f9a (patch) | |
tree | 30d61b197e290fc4acd5a3e8a73221506c57c05a /src | |
parent | 8eaffb654f1cc5c66bcccfd069e43834405c200f (diff) |
helpers-qmi: always log all queried capabilities when building current
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-modem-helpers-qmi.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/src/mm-modem-helpers-qmi.c b/src/mm-modem-helpers-qmi.c index 8c99d512..d339f489 100644 --- a/src/mm-modem-helpers-qmi.c +++ b/src/mm-modem-helpers-qmi.c @@ -1496,27 +1496,28 @@ mm_modem_capability_from_qmi_capabilities_context (MMQmiCapabilitiesContext *ctx /* If not a multimode device, we're done */ #define MULTIMODE (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO) if ((ctx->dms_capabilities & MULTIMODE) != MULTIMODE) - return ctx->dms_capabilities; - - /* 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 */ - 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); - - /* Final capabilities are the intersection between the Technology - * Preference or SSP and the device's capabilities. - * If the Technology Preference was "auto" or unknown we just fall back - * to the Get Capabilities response. - */ - if (tmp == MM_MODEM_CAPABILITY_NONE) tmp = ctx->dms_capabilities; - else - tmp &= ctx->dms_capabilities; + 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 */ + 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); + + /* Final capabilities are the intersection between the Technology + * Preference or SSP and the device's capabilities. + * If the Technology Preference was "auto" or unknown we just fall back + * to the Get Capabilities response. + */ + if (tmp == MM_MODEM_CAPABILITY_NONE) + tmp = ctx->dms_capabilities; + else + tmp &= ctx->dms_capabilities; + } /* 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); |