From 65a7624ffdd39b015d5013743913af8361e83513 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 15 Mar 2021 15:11:41 +0100 Subject: [PATCH] shared-qmi: if getting TP/SSP fails, assume unsupported Until now we were only considering TP/SSP unsupported if we received a QMI protocol error (e.g. reporting unknown command). We now also consider TP/SSP unsupported if the actual request succeeds, but an error is reported in the response. There is no point in considering TP/SSP supported if the plain get request without input TLVs given fails. --- src/mm-shared-qmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mm-shared-qmi.c b/src/mm-shared-qmi.c index 320600d9..0b2783e9 100644 --- a/src/mm-shared-qmi.c +++ b/src/mm-shared-qmi.c @@ -889,7 +889,7 @@ load_current_capabilities_get_technology_preference_ready (QmiClientNas *client, } else if (!qmi_message_nas_get_technology_preference_output_get_result (output, &error)) { mm_obj_dbg (self, "couldn't get technology preference: %s", error->message); g_error_free (error); - priv->feature_nas_tp = FEATURE_SUPPORTED; + priv->feature_nas_tp = FEATURE_UNSUPPORTED; } else { qmi_message_nas_get_technology_preference_output_get_active ( output, @@ -929,7 +929,7 @@ load_current_capabilities_get_system_selection_preference_ready (QmiClientNas *c } else if (!qmi_message_nas_get_system_selection_preference_output_get_result (output, &error)) { mm_obj_dbg (self, "couldn't get system selection preference: %s", error->message); g_error_free (error); - priv->feature_nas_ssp = FEATURE_SUPPORTED; + priv->feature_nas_ssp = FEATURE_UNSUPPORTED; } else { qmi_message_nas_get_system_selection_preference_output_get_mode_preference ( output,