broadband-modem: redefine generic supported mode loading implementation
* assume CDMA1x is 2G * consider CS/PS/CDMA1x/EVDO network support flags specified by the plugins
This commit is contained in:
@@ -906,7 +906,7 @@ modem_load_supported_modes (MMIfaceModem *self,
|
|||||||
GSimpleAsyncResult *result;
|
GSimpleAsyncResult *result;
|
||||||
MMModemMode mode;
|
MMModemMode mode;
|
||||||
|
|
||||||
mm_dbg ("loading supported modes...");
|
mm_dbg ("loading initial supported modes...");
|
||||||
result = g_simple_async_result_new (G_OBJECT (self),
|
result = g_simple_async_result_new (G_OBJECT (self),
|
||||||
callback,
|
callback,
|
||||||
user_data,
|
user_data,
|
||||||
@@ -914,12 +914,23 @@ modem_load_supported_modes (MMIfaceModem *self,
|
|||||||
|
|
||||||
mode = MM_MODEM_MODE_NONE;
|
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) {
|
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) {
|
/* 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;
|
mode |= MM_MODEM_MODE_3G;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user