aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lassalle <andrewlassalle@chromium.org>2021-10-14 11:59:50 -0700
committerAleksander Morgado <aleksander@aleksander.es>2021-10-17 17:56:44 +0200
commitb2a7591bcfc765089004129501d418f474a3ae8b (patch)
treece7fc276e942c471ae8f5e9ba55276766cf73542
parent8ecf7fc83e8ef0e1985b6a57da5bb25b26e43c72 (diff)
broadband-modem-qmi: Add the profile name to profiles
-rw-r--r--src/mm-broadband-modem-qmi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
index 7e0f582e..71524696 100644
--- a/src/mm-broadband-modem-qmi.c
+++ b/src/mm-broadband-modem-qmi.c
@@ -5658,6 +5658,9 @@ wds_profile_settings_to_3gpp_profile (MMBroadbandModemQmi *se
if (qmi_message_wds_get_profile_settings_output_get_apn_name (output, &str, NULL))
mm_3gpp_profile_set_apn (profile, str);
+ if (qmi_message_wds_get_profile_settings_output_get_profile_name (output, &str, NULL))
+ mm_3gpp_profile_set_profile_name (profile, str);
+
if (qmi_message_wds_get_profile_settings_output_get_pdp_type (output, &pdp_type, NULL))
mm_3gpp_profile_set_ip_type (profile, mm_bearer_ip_family_from_qmi_pdp_type (pdp_type));
@@ -5906,6 +5909,7 @@ modem_3gpp_profile_manager_list_profiles (MMIfaceModem3gppProfileManager *self,
typedef struct {
QmiClientWds *client;
gint profile_id;
+ gchar *profile_name;
gchar *apn;
gchar *user;
gchar *password;
@@ -5917,6 +5921,7 @@ typedef struct {
static void
store_profile_context_free (StoreProfileContext *ctx)
{
+ g_free (ctx->profile_name);
g_free (ctx->apn);
g_free (ctx->user);
g_free (ctx->password);
@@ -6039,6 +6044,7 @@ store_profile_run (GTask *task)
/* when creating, we cannot select which profile id to use */
input = qmi_message_wds_create_profile_input_new ();
qmi_message_wds_create_profile_input_set_profile_type (input, QMI_WDS_PROFILE_TYPE_3GPP, NULL);
+ qmi_message_wds_create_profile_input_set_profile_name (input, ctx->profile_name, NULL);
qmi_message_wds_create_profile_input_set_pdp_type (input, ctx->qmi_pdp_type, NULL);
qmi_message_wds_create_profile_input_set_apn_name (input, ctx->apn, NULL);
qmi_message_wds_create_profile_input_set_authentication (input, ctx->qmi_auth, NULL);
@@ -6058,6 +6064,7 @@ store_profile_run (GTask *task)
input = qmi_message_wds_modify_profile_input_new ();
qmi_message_wds_modify_profile_input_set_profile_identifier (input, QMI_WDS_PROFILE_TYPE_3GPP, ctx->profile_id, NULL);
+ qmi_message_wds_modify_profile_input_set_profile_name (input, ctx->profile_name, NULL);
qmi_message_wds_modify_profile_input_set_pdp_type (input, ctx->qmi_pdp_type, NULL);
qmi_message_wds_modify_profile_input_set_apn_name (input, ctx->apn, NULL);
qmi_message_wds_modify_profile_input_set_authentication (input, ctx->qmi_auth, NULL);
@@ -6101,6 +6108,8 @@ modem_3gpp_profile_manager_store_profile (MMIfaceModem3gppProfileManager *self,
/* Note: may be UNKNOWN */
ctx->profile_id = mm_3gpp_profile_get_profile_id (profile);
+ ctx->profile_name = g_strdup (mm_3gpp_profile_get_profile_name (profile));
+
ctx->apn = g_strdup (mm_3gpp_profile_get_apn (profile));
apn_type = mm_3gpp_profile_get_apn_type (profile);