aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-01-13 11:41:47 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:50 +0100
commite5c5411d0514f121e9c98c2b49b6d9a11a60cc1a (patch)
treeef879d432a8d55823f14649dd1c9d14e0e8fc236 /src
parent8adc9cd699503885d9878403834d2a7f674cc661 (diff)
broadband-modem: redefine generic supported mode loading implementation
* assume CDMA1x is 2G * consider CS/PS/CDMA1x/EVDO network support flags specified by the plugins
Diffstat (limited to 'src')
-rw-r--r--src/mm-broadband-modem.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index 1d4d1a4d..01d0aa48 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -906,7 +906,7 @@ modem_load_supported_modes (MMIfaceModem *self,
GSimpleAsyncResult *result;
MMModemMode mode;
- mm_dbg ("loading supported modes...");
+ mm_dbg ("loading initial supported modes...");
result = g_simple_async_result_new (G_OBJECT (self),
callback,
user_data,
@@ -914,13 +914,24 @@ modem_load_supported_modes (MMIfaceModem *self,
mode = MM_MODEM_MODE_NONE;
- /* If the modem has +GSM caps, assume it does CS, 2G and 3G */
+ /* If the modem has +GSM caps... */
if (broadband->priv->modem_current_capabilities & MM_MODEM_CAPABILITY_GSM_UMTS) {
- mode |= (MM_MODEM_MODE_CS | MM_MODEM_MODE_2G | MM_MODEM_MODE_3G);
+ /* There are modems which only support CS connections (e.g. Iridium) */
+ if (broadband->priv->modem_3gpp_cs_network_supported)
+ mode |= MM_MODEM_MODE_CS;
+ /* If PS supported, assume we can do both 2G and 3G, even if it may not really
+ * be true. This is the generic implementation anyway, plugins can use modem
+ * specific commands to check which technologies are supported. */
+ if (broadband->priv->modem_3gpp_ps_network_supported)
+ mode |= (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G);
}
- /* If the modem has CDMA caps, assume it does 3G */
- else if (broadband->priv->modem_current_capabilities & MM_MODEM_CAPABILITY_CDMA_EVDO) {
- mode |= MM_MODEM_MODE_3G;
+
+ /* If the modem has CDMA caps... */
+ if (broadband->priv->modem_current_capabilities & MM_MODEM_CAPABILITY_CDMA_EVDO) {
+ if (broadband->priv->modem_cdma_cdma1x_network_supported)
+ mode |= MM_MODEM_MODE_2G;
+ if (broadband->priv->modem_cdma_evdo_network_supported)
+ mode |= MM_MODEM_MODE_3G;
}
/* If the modem has LTE caps, it does 4G */