diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-01-12 10:57:05 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 14:14:49 +0100 |
commit | 8782df1b152b0ade1970282fb799ac6608fa3483 (patch) | |
tree | 4853a70bcce760c588cfcf7cdda8f19af2d2ba21 /src | |
parent | 744fe5712df5de050f2942c1cb692a53d2eead70 (diff) |
broadband-modem: on mixed CDMA+LTE modems, guess which kind of bearer to create
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-broadband-modem.c | 21 |
1 files changed, 15 insertions, 6 deletions
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; } |