From 778d953f52a61b2f90207e2900f7e33235e9ae29 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 26 Jan 2024 12:26:23 +0000 Subject: [PATCH] broadband-modem-mbim: use MBIMEx to list profiles unconditionally if available We currently don't use the MBIMEx profile management operations by default because the way profiles are managed is different (i.e. profile id as index vs context type as index). Still, when listing profile contents, we can use the MBIMEx operation if supported, because it gives us much more information than the original MBIM command, including IP type and profile source. --- src/mm-broadband-modem-mbim.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c index 37669c81..91931914 100644 --- a/src/mm-broadband-modem-mbim.c +++ b/src/mm-broadband-modem-mbim.c @@ -7692,7 +7692,10 @@ modem_3gpp_profile_manager_list_profiles (MMIfaceModem3gppProfileManager *_self mm_obj_dbg (self, "querying provisioned contexts..."); - if (self->priv->is_profile_management_ext_supported) { + /* We will use the MBIMEx operation not only when testing with MBIMEx profile management + * support, but also any time the command is supported by the modem, because it gives much + * more information than the default one. */ + if (self->priv->is_context_type_ext_supported) { message = mbim_message_ms_basic_connect_extensions_provisioned_contexts_query_new (NULL); mbim_device_command (device, message,