summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2013-04-29 10:23:20 -0500
committerDan Williams <dcbw@redhat.com>2013-05-01 11:19:26 -0500
commit8dd2b8f20265e821248421181311230360a193a6 (patch)
tree3b98bf87aa9e059bd979907d65f8637fbdec8a18
parent32d6dda859ec599340ddd58f2b26e8d8769952f8 (diff)
downloadModemManager-dcbw/zte-cdma-access-tech.tar.gz
broadband-modem-zte: chain up to parent access tech loading for CDMA-only devices (bgo #698850)dcbw/zte-cdma-access-tech
CDMA-only devices don't support +ZPAS for access tech loading, so chain up to the parent so we get the QCDM fallback access tech loading functions. https://bugzilla.gnome.org/show_bug.cgi?id=698850
-rw-r--r--plugins/zte/mm-broadband-modem-zte.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/plugins/zte/mm-broadband-modem-zte.c b/plugins/zte/mm-broadband-modem-zte.c
index b87713483..e7d190ad0 100644
--- a/plugins/zte/mm-broadband-modem-zte.c
+++ b/plugins/zte/mm-broadband-modem-zte.c
@@ -36,6 +36,7 @@
static void iface_modem_init (MMIfaceModem *iface);
static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface);
+static MMIfaceModem *iface_modem_parent;
static MMIfaceModem3gpp *iface_modem_3gpp_parent;
G_DEFINE_TYPE_EXTENDED (MMBroadbandModemZte, mm_broadband_modem_zte, MM_TYPE_BROADBAND_MODEM, 0,
@@ -464,6 +465,16 @@ load_access_technologies_finish (MMIfaceModem *self,
{
const gchar *response;
+ /* CDMA-only devices run parent access technology checks */
+ if (mm_iface_modem_is_cdma_only (self)) {
+ return iface_modem_parent->load_access_technologies_finish (self,
+ res,
+ access_technologies,
+ mask,
+ error);
+ }
+
+ /* Otherwise process and handle +ZPAS response from 3GPP devices */
response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, error);
if (!response)
return FALSE;
@@ -477,12 +488,19 @@ load_access_technologies_finish (MMIfaceModem *self,
return TRUE;
}
-
static void
load_access_technologies (MMIfaceModem *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
+
+ /* CDMA modems don't support ZPAS and thus run parent's access technology
+ * loading. */
+ if (mm_iface_modem_is_cdma_only (self)) {
+ iface_modem_parent->load_access_technologies (self, callback, user_data);
+ return;
+ }
+
mm_base_modem_at_command (MM_BASE_MODEM (self),
"+ZPAS?",
3,
@@ -653,6 +671,8 @@ finalize (GObject *object)
static void
iface_modem_init (MMIfaceModem *iface)
{
+ iface_modem_parent = g_type_interface_peek_parent (iface);
+
iface->modem_after_sim_unlock = modem_after_sim_unlock;
iface->modem_after_sim_unlock_finish = modem_after_sim_unlock_finish;
iface->modem_power_down = modem_power_down;