summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-11-02 09:52:31 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-11-02 09:52:31 +0100
commit9ec90d9a11f53c91274a1341217e7da5f8621674 (patch)
tree2dc913f810b07b1d31cd78272932011e3df0d961
parent96305bb5c1d32e5a0e517750501b705502e74111 (diff)
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).
-rw-r--r--plugins/huawei/mm-broadband-modem-huawei.c7
-rw-r--r--plugins/icera/mm-broadband-modem-icera.c9
-rw-r--r--plugins/linktop/mm-broadband-modem-linktop.c7
-rw-r--r--plugins/longcheer/mm-broadband-modem-longcheer.c7
-rw-r--r--plugins/option/mm-broadband-modem-option.c9
-rw-r--r--plugins/x22x/mm-broadband-modem-x22x.c7
-rw-r--r--plugins/zte/mm-broadband-modem-zte.c7
-rw-r--r--src/mm-broadband-modem.c7
-rw-r--r--src/mm-modem-helpers-qmi.c9
9 files changed, 4 insertions, 65 deletions
diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c
index 77441f43..5cac1fdc 100644
--- a/plugins/huawei/mm-broadband-modem-huawei.c
+++ b/plugins/huawei/mm-broadband-modem-huawei.c
@@ -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,
diff --git a/plugins/icera/mm-broadband-modem-icera.c b/plugins/icera/mm-broadband-modem-icera.c
index 697e8cc6..e613f84c 100644
--- a/plugins/icera/mm-broadband-modem-icera.c
+++ b/plugins/icera/mm-broadband-modem-icera.c
@@ -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
diff --git a/plugins/linktop/mm-broadband-modem-linktop.c b/plugins/linktop/mm-broadband-modem-linktop.c
index c34cf09a..49722819 100644
--- a/plugins/linktop/mm-broadband-modem-linktop.c
+++ b/plugins/linktop/mm-broadband-modem-linktop.c
@@ -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)
diff --git a/plugins/longcheer/mm-broadband-modem-longcheer.c b/plugins/longcheer/mm-broadband-modem-longcheer.c
index 1e52c2ea..9734eb8f 100644
--- a/plugins/longcheer/mm-broadband-modem-longcheer.c
+++ b/plugins/longcheer/mm-broadband-modem-longcheer.c
@@ -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)
diff --git a/plugins/option/mm-broadband-modem-option.c b/plugins/option/mm-broadband-modem-option.c
index 4acd16ac..274b2875 100644
--- a/plugins/option/mm-broadband-modem-option.c
+++ b/plugins/option/mm-broadband-modem-option.c
@@ -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)
diff --git a/plugins/x22x/mm-broadband-modem-x22x.c b/plugins/x22x/mm-broadband-modem-x22x.c
index b7b16891..f61845a7 100644
--- a/plugins/x22x/mm-broadband-modem-x22x.c
+++ b/plugins/x22x/mm-broadband-modem-x22x.c
@@ -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)
diff --git a/plugins/zte/mm-broadband-modem-zte.c b/plugins/zte/mm-broadband-modem-zte.c
index dc0898e9..e9bc99f0 100644
--- a/plugins/zte/mm-broadband-modem-zte.c
+++ b/plugins/zte/mm-broadband-modem-zte.c
@@ -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;
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index 95a61cdb..9161c82c 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -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);
diff --git a/src/mm-modem-helpers-qmi.c b/src/mm-modem-helpers-qmi.c
index 0b727791..f121fc9d 100644
--- a/src/mm-modem-helpers-qmi.c
+++ b/src/mm-modem-helpers-qmi.c
@@ -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;
}