From f05258e757558b93559b4d36087e89ec926c5423 Mon Sep 17 00:00:00 2001 From: Prakash Pabba Date: Thu, 9 Dec 2021 16:54:54 +0530 Subject: mm-modem-helpers-qmi: Fix current capabilities for multimode device Keep LTE or 5GNR always in current capabilities if supported by device. Since capability switching logic is exclusively used for configuring GSM/UMTS+CDMA/EVDO devices, decide if to have GSM/UMTS or CDMA/EVDO or both or none when loading current capabilities. --- src/mm-modem-helpers-qmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mm-modem-helpers-qmi.c') diff --git a/src/mm-modem-helpers-qmi.c b/src/mm-modem-helpers-qmi.c index d5316363..4d8aec5e 100644 --- a/src/mm-modem-helpers-qmi.c +++ b/src/mm-modem-helpers-qmi.c @@ -1856,15 +1856,15 @@ mm_modem_capability_from_qmi_capabilities_context (MMQmiCapabilitiesContext *ctx 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. + /* Final capabilities are the union of the active multimode capability + * (GSM/UMTS or CDMA/EVDO or both or none) in TP or SSP and other supported 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; + tmp = (tmp & MULTIMODE) | (MULTIMODE ^ ctx->dms_capabilities); } /* Log about the logic applied */ -- cgit v1.2.3-70-g09d2