From 81302efa661f848455a1bfe44b27608b11d6d49b Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 25 Oct 2021 21:39:46 +0200 Subject: iface-modem: use external dispatcher to attempt FCC unlock We remove the built-in FCC unlock procedures from the ModemManager, we will no longer run them automatically, and instead rely on external scripts/programs to do that. Packages providing the external FCC unlock tools can install them in ${pkglibdir}/fcc-unlock.d. Users manually enabling external FCC unlock tools can install them in ${pkgsysconfdir}/fcc-unlock.d. The user-enabled path takes precedence over the package-enabled one. --- src/mm-shared-qmi.c | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) (limited to 'src/mm-shared-qmi.c') diff --git a/src/mm-shared-qmi.c b/src/mm-shared-qmi.c index f6b2a44d..c9a90812 100644 --- a/src/mm-shared-qmi.c +++ b/src/mm-shared-qmi.c @@ -4220,56 +4220,6 @@ mm_shared_qmi_setup_sim_hot_swap (MMIfaceModem *self, task); } -/*****************************************************************************/ -/* FCC unlock (Modem interface) */ - -gboolean -mm_shared_qmi_fcc_unlock_finish (MMIfaceModem *self, - GAsyncResult *res, - GError **error) -{ - return g_task_propagate_boolean (G_TASK (res), error); -} - -static void -dms_set_fcc_authentication_ready (QmiClientDms *client, - GAsyncResult *res, - GTask *task) -{ - GError *error = NULL; - g_autoptr(QmiMessageDmsSetFccAuthenticationOutput) output = NULL; - - output = qmi_client_dms_set_fcc_authentication_finish (client, res, &error); - if (!output || !qmi_message_dms_set_fcc_authentication_output_get_result (output, &error)) - g_task_return_error (task, error); - else - g_task_return_boolean (task, TRUE); - g_object_unref (task); -} - -void -mm_shared_qmi_fcc_unlock (MMIfaceModem *self, - GAsyncReadyCallback callback, - gpointer user_data) -{ - GTask *task; - QmiClient *client = NULL; - - if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), - QMI_SERVICE_DMS, &client, - callback, user_data)) - return; - - task = g_task_new (self, NULL, callback, user_data); - - qmi_client_dms_set_fcc_authentication (QMI_CLIENT_DMS (client), - NULL, - 5, - NULL, - (GAsyncReadyCallback)dms_set_fcc_authentication_ready, - task); -} - /*****************************************************************************/ /* Location: Set SUPL server */ -- cgit v1.2.3-70-g09d2