aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-10-25 21:39:46 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-11-17 11:30:01 +0100
commit81302efa661f848455a1bfe44b27608b11d6d49b (patch)
treec4ee58c60d071f992c6bab8c8016e557e6d490eb /plugins
parent21c775703c9e3852fdda206a9658cb236613ef85 (diff)
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.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/foxconn/mm-broadband-modem-mbim-foxconn.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c b/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c
index cd1aeb84..de694578 100644
--- a/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c
+++ b/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c
@@ -41,7 +41,6 @@
static void iface_modem_location_init (MMIfaceModemLocation *iface);
#if defined WITH_QMI
-static void iface_modem_init (MMIfaceModem *iface);
static void iface_modem_firmware_init (MMIfaceModemFirmware *iface);
#endif
@@ -49,7 +48,6 @@ static MMIfaceModemLocation *iface_modem_location_parent;
G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMbimFoxconn, mm_broadband_modem_mbim_foxconn, MM_TYPE_BROADBAND_MODEM_MBIM, 0,
#if defined WITH_QMI
- G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init)
G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM_FIRMWARE, iface_modem_firmware_init)
#endif
G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM_LOCATION, iface_modem_location_init))
@@ -68,59 +66,6 @@ struct _MMBroadbandModemMbimFoxconnPrivate {
#if defined WITH_QMI
/*****************************************************************************/
-/* FCC unlock (Modem interface) */
-
-static gboolean
-fcc_unlock_finish (MMIfaceModem *self,
- GAsyncResult *res,
- GError **error)
-{
- return g_task_propagate_boolean (G_TASK (res), error);
-}
-
-static void
-dms_foxconn_set_fcc_authentication_ready (QmiClientDms *client,
- GAsyncResult *res,
- GTask *task)
-{
- GError *error = NULL;
- g_autoptr(QmiMessageDmsFoxconnSetFccAuthenticationOutput) output = NULL;
-
- output = qmi_client_dms_foxconn_set_fcc_authentication_finish (client, res, &error);
- if (!output || !qmi_message_dms_foxconn_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);
-}
-
-static void
-fcc_unlock (MMIfaceModem *self,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- GTask *task;
- QmiClient *client = NULL;
- g_autoptr(QmiMessageDmsFoxconnSetFccAuthenticationInput) input = 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);
-
- input = qmi_message_dms_foxconn_set_fcc_authentication_input_new ();
- qmi_message_dms_foxconn_set_fcc_authentication_input_set_value (input, 0x00, NULL);
- qmi_client_dms_foxconn_set_fcc_authentication (QMI_CLIENT_DMS (client),
- input,
- 5,
- NULL,
- (GAsyncReadyCallback)dms_foxconn_set_fcc_authentication_ready,
- task);
-}
-
-/*****************************************************************************/
/* Firmware update settings
*
* We only support reporting firmware update settings when QMI support is built,
@@ -555,13 +500,6 @@ iface_modem_location_init (MMIfaceModemLocation *iface)
#if defined WITH_QMI
static void
-iface_modem_init (MMIfaceModem *iface)
-{
- iface->fcc_unlock = fcc_unlock;
- iface->fcc_unlock_finish = fcc_unlock_finish;
-}
-
-static void
iface_modem_firmware_init (MMIfaceModemFirmware *iface)
{
iface->load_update_settings = firmware_load_update_settings;