core,plugins: don't assume 'CS' supported when '2G' supported
We will not report 'CS' as a supported mode every time '2G' is supported. This actually was forcing all plugins to handle a 'CS' fallback when they didn't have CS-specific mode setup. So, to simplify things, we will only report 'CS' as supported for those plugins which actually allow to select 'CS' mode (e.g. the 'wavecom' plugin).
This commit is contained in:
@@ -646,13 +646,6 @@ set_allowed_modes (MMIfaceModem *self,
|
||||
user_data,
|
||||
set_allowed_modes);
|
||||
|
||||
/* There is no explicit config for CS connections, we just assume we may
|
||||
* have them as part of 2G when no GPRS is available */
|
||||
if (allowed & MM_MODEM_MODE_CS) {
|
||||
allowed |= MM_MODEM_MODE_2G;
|
||||
allowed &= ~MM_MODEM_MODE_CS;
|
||||
}
|
||||
|
||||
if (!allowed_mode_to_huawei (allowed,
|
||||
preferred,
|
||||
&mode,
|
||||
|
||||
@@ -113,7 +113,7 @@ modem_load_allowed_modes_finish (MMIfaceModem *self,
|
||||
*preferred = MM_MODEM_MODE_3G;
|
||||
return TRUE;
|
||||
case 5: /* any */
|
||||
*allowed = (MM_MODEM_MODE_CS | MM_MODEM_MODE_2G | MM_MODEM_MODE_3G);
|
||||
*allowed = (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G);
|
||||
*preferred = MM_MODEM_MODE_NONE;
|
||||
return TRUE;
|
||||
default:
|
||||
@@ -185,13 +185,6 @@ modem_set_allowed_modes (MMIfaceModem *self,
|
||||
user_data,
|
||||
modem_set_allowed_modes);
|
||||
|
||||
/* There is no explicit config for CS connections, we just assume we may
|
||||
* have them as part of 2G when no GPRS is available */
|
||||
if (allowed & MM_MODEM_MODE_CS) {
|
||||
allowed |= MM_MODEM_MODE_2G;
|
||||
allowed &= ~MM_MODEM_MODE_CS;
|
||||
}
|
||||
|
||||
/*
|
||||
* The core has checked the following:
|
||||
* - that 'allowed' are a subset of the 'supported' modes
|
||||
|
||||
@@ -153,13 +153,6 @@ set_allowed_modes (MMIfaceModem *self,
|
||||
user_data,
|
||||
set_allowed_modes);
|
||||
|
||||
/* There is no explicit config for CS connections, we just assume we may
|
||||
* have them as part of 2G when no GPRS is available */
|
||||
if (allowed & MM_MODEM_MODE_CS) {
|
||||
allowed |= MM_MODEM_MODE_2G;
|
||||
allowed &= ~MM_MODEM_MODE_CS;
|
||||
}
|
||||
|
||||
if (allowed == MM_MODEM_MODE_2G)
|
||||
linktop_mode = LINKTOP_MODE_2G;
|
||||
else if (allowed == MM_MODEM_MODE_3G)
|
||||
|
||||
@@ -148,13 +148,6 @@ set_allowed_modes (MMIfaceModem *self,
|
||||
user_data,
|
||||
set_allowed_modes);
|
||||
|
||||
/* There is no explicit config for CS connections, we just assume we may
|
||||
* have them as part of 2G when no GPRS is available */
|
||||
if (allowed & MM_MODEM_MODE_CS) {
|
||||
allowed |= MM_MODEM_MODE_2G;
|
||||
allowed &= ~MM_MODEM_MODE_CS;
|
||||
}
|
||||
|
||||
if (allowed == MM_MODEM_MODE_2G)
|
||||
mododr = 3;
|
||||
else if (allowed == MM_MODEM_MODE_3G)
|
||||
|
||||
@@ -103,7 +103,7 @@ load_allowed_modes_finish (MMIfaceModem *self,
|
||||
*preferred = MM_MODEM_MODE_3G;
|
||||
return TRUE;
|
||||
case 5: /* any */
|
||||
*allowed = (MM_MODEM_MODE_CS | MM_MODEM_MODE_2G | MM_MODEM_MODE_3G);
|
||||
*allowed = (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G);
|
||||
*preferred = MM_MODEM_MODE_NONE;
|
||||
return TRUE;
|
||||
default:
|
||||
@@ -175,13 +175,6 @@ set_allowed_modes (MMIfaceModem *self,
|
||||
user_data,
|
||||
set_allowed_modes);
|
||||
|
||||
/* There is no explicit config for CS connections, we just assume we may
|
||||
* have them as part of 2G when no GPRS is available */
|
||||
if (allowed & MM_MODEM_MODE_CS) {
|
||||
allowed |= MM_MODEM_MODE_2G;
|
||||
allowed &= ~MM_MODEM_MODE_CS;
|
||||
}
|
||||
|
||||
if (allowed == MM_MODEM_MODE_2G)
|
||||
option_mode = 0;
|
||||
else if (allowed == MM_MODEM_MODE_3G)
|
||||
|
||||
@@ -153,13 +153,6 @@ set_allowed_modes (MMIfaceModem *self,
|
||||
user_data,
|
||||
set_allowed_modes);
|
||||
|
||||
/* There is no explicit config for CS connections, we just assume we may
|
||||
* have them as part of 2G when no GPRS is available */
|
||||
if (allowed & MM_MODEM_MODE_CS) {
|
||||
allowed |= MM_MODEM_MODE_2G;
|
||||
allowed &= ~MM_MODEM_MODE_CS;
|
||||
}
|
||||
|
||||
if (allowed == MM_MODEM_MODE_2G)
|
||||
syssel = 1;
|
||||
else if (allowed == MM_MODEM_MODE_3G)
|
||||
|
||||
@@ -318,13 +318,6 @@ set_allowed_modes (MMIfaceModem *self,
|
||||
user_data,
|
||||
set_allowed_modes);
|
||||
|
||||
/* There is no explicit config for CS connections, we just assume we may
|
||||
* have them as part of 2G when no GPRS is available */
|
||||
if (allowed & MM_MODEM_MODE_CS) {
|
||||
allowed |= MM_MODEM_MODE_2G;
|
||||
allowed &= ~MM_MODEM_MODE_CS;
|
||||
}
|
||||
|
||||
if (allowed == MM_MODEM_MODE_2G) {
|
||||
cm_mode = 1;
|
||||
pref_acq = 0;
|
||||
|
||||
@@ -1205,13 +1205,6 @@ supported_modes_ws46_test_ready (MMBroadbandModem *self,
|
||||
}
|
||||
}
|
||||
|
||||
/* We'll assume CS supported if we have 2G */
|
||||
if (!(ctx->mode & MM_MODEM_MODE_CS) &&
|
||||
ctx->mode & MM_MODEM_MODE_2G) {
|
||||
mm_dbg ("Assuming device allows (3GPP) 2G/3G network modes");
|
||||
ctx->mode |= MM_MODEM_MODE_CS;
|
||||
}
|
||||
|
||||
/* Now keep on with the loading, we may need CDMA-specific checks */
|
||||
ctx->run_ws46 = FALSE;
|
||||
load_supported_modes_step (ctx);
|
||||
|
||||
@@ -751,8 +751,7 @@ mm_modem_mode_from_qmi_radio_technology_preference (QmiNasRadioTechnologyPrefere
|
||||
MMModemMode mode = MM_MODEM_MODE_NONE;
|
||||
|
||||
if (qmi & QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP2) {
|
||||
if (qmi & QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AMPS_OR_GSM)
|
||||
mode |= MM_MODEM_MODE_CS; /* AMPS */
|
||||
/* Ignore AMPS, we really don't report CS mode in QMI modems */
|
||||
if (qmi & QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA)
|
||||
mode |= MM_MODEM_MODE_2G; /* CDMA */
|
||||
if (qmi & QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_HDR)
|
||||
@@ -761,7 +760,7 @@ mm_modem_mode_from_qmi_radio_technology_preference (QmiNasRadioTechnologyPrefere
|
||||
|
||||
if (qmi & QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP) {
|
||||
if (qmi & QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AMPS_OR_GSM)
|
||||
mode |= (MM_MODEM_MODE_CS | MM_MODEM_MODE_2G); /* GSM */
|
||||
mode |= MM_MODEM_MODE_2G; /* GSM */
|
||||
if (qmi & QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA)
|
||||
mode |= MM_MODEM_MODE_3G; /* WCDMA */
|
||||
}
|
||||
@@ -820,10 +819,6 @@ mm_modem_mode_from_qmi_rat_mode_preference (QmiNasRatModePreference qmi)
|
||||
if (qmi & QMI_NAS_RAT_MODE_PREFERENCE_LTE)
|
||||
mode |= MM_MODEM_MODE_4G;
|
||||
|
||||
/* Assume CS if 2G supported */
|
||||
if (mode & MM_MODEM_MODE_2G)
|
||||
mode |= MM_MODEM_MODE_CS;
|
||||
|
||||
return mode;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user