diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2018-08-21 16:26:45 +0200 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2018-09-12 17:17:36 +0000 |
commit | eb01914bd0cada5d2ed144d5f3f45fd17722e97c (patch) | |
tree | fc94f790e7346b54ced4ca6ed0699a120a92fd63 /plugins/ublox/mm-broadband-modem-ublox.c | |
parent | 02821232878d2a12bf248b7f2594c48076593810 (diff) |
ublox: implement custom ICCID loading
Use AT+CCID to query the SIM ICCID, and fallback to parent's +CRSM
based method otherwise.
Diffstat (limited to 'plugins/ublox/mm-broadband-modem-ublox.c')
-rw-r--r-- | plugins/ublox/mm-broadband-modem-ublox.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/plugins/ublox/mm-broadband-modem-ublox.c b/plugins/ublox/mm-broadband-modem-ublox.c index 56441d77..79688b2f 100644 --- a/plugins/ublox/mm-broadband-modem-ublox.c +++ b/plugins/ublox/mm-broadband-modem-ublox.c @@ -29,6 +29,7 @@ #include "mm-broadband-bearer.h" #include "mm-broadband-modem-ublox.h" #include "mm-broadband-bearer-ublox.h" +#include "mm-sim-ublox.h" #include "mm-modem-helpers-ublox.h" #include "mm-ublox-enums-types.h" @@ -1000,6 +1001,28 @@ modem_create_bearer (MMIfaceModem *self, } /*****************************************************************************/ +/* Create SIM (Modem interface) */ + +static MMBaseSim * +modem_create_sim_finish (MMIfaceModem *self, + GAsyncResult *res, + GError **error) +{ + return mm_sim_ublox_new_finish (res, error); +} + +static void +modem_create_sim (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + mm_sim_ublox_new (MM_BASE_MODEM (self), + NULL, /* cancellable */ + callback, + user_data); +} + +/*****************************************************************************/ /* Setup ports (Broadband modem class) */ static void @@ -1068,6 +1091,8 @@ mm_broadband_modem_ublox_init (MMBroadbandModemUblox *self) static void iface_modem_init (MMIfaceModem *iface) { + iface->create_sim = modem_create_sim; + iface->create_sim_finish = modem_create_sim_finish; iface->create_bearer = modem_create_bearer; iface->create_bearer_finish = modem_create_bearer_finish; iface->load_unlock_retries = load_unlock_retries; |