From 8782df1b152b0ade1970282fb799ac6608fa3483 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 12 Jan 2012 10:57:05 +0100 Subject: broadband-modem: on mixed CDMA+LTE modems, guess which kind of bearer to create --- src/mm-broadband-modem.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 3fa7661a..1dfebe50 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -239,16 +239,25 @@ modem_create_bearer (MMIfaceModem *self, return; } - /* On mixed LTE and CDMA modems, we'll default to building a 3GPP bearer. + /* On mixed LTE and CDMA modems, we'll build a 3GPP bearer if 'apn' was + * given, and a CDMA bearer otherwise. * Plugins supporting mixed LTE+CDMA modems can override this and provide * their own specific and detailed logic. */ if (mm_iface_modem_is_cdma (self) && mm_iface_modem_is_3gpp_lte (self)) { - mm_dbg ("Creating 3GPP Bearer in mixed CDMA+LTE modem"); - mm_iface_modem_3gpp_create_bearer (MM_IFACE_MODEM_3GPP (self), - properties, - (GAsyncReadyCallback)modem_3gpp_create_bearer_ready, - result); + if (mm_common_bearer_properties_get_apn (properties)) { + mm_dbg ("Creating 3GPP Bearer in mixed CDMA+LTE modem"); + mm_iface_modem_3gpp_create_bearer (MM_IFACE_MODEM_3GPP (self), + properties, + (GAsyncReadyCallback)modem_3gpp_create_bearer_ready, + result); + } else { + mm_dbg ("Creating CDMA Bearer in mixed CDMA+LTE modem"); + mm_iface_modem_cdma_create_bearer (MM_IFACE_MODEM_CDMA (self), + properties, + (GAsyncReadyCallback)modem_cdma_create_bearer_ready, + result); + } return; } -- cgit v1.2.3-70-g09d2