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
@@ -648,9 +648,2 @@ set_allowed_modes (MMIfaceModem *self,
- /* 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,
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
@@ -115,3 +115,3 @@ modem_load_allowed_modes_finish (MMIfaceModem *self,
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;
@@ -187,9 +187,2 @@ modem_set_allowed_modes (MMIfaceModem *self,
- /* 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;
- }
-
/*
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
@@ -155,9 +155,2 @@ set_allowed_modes (MMIfaceModem *self,
- /* 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)
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
@@ -150,9 +150,2 @@ set_allowed_modes (MMIfaceModem *self,
- /* 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)
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
@@ -105,3 +105,3 @@ load_allowed_modes_finish (MMIfaceModem *self,
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;
@@ -177,9 +177,2 @@ set_allowed_modes (MMIfaceModem *self,
- /* 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)
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
@@ -155,9 +155,2 @@ set_allowed_modes (MMIfaceModem *self,
- /* 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)
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
@@ -320,9 +320,2 @@ set_allowed_modes (MMIfaceModem *self,
- /* 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) {
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
@@ -1207,9 +1207,2 @@ 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 */
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
@@ -753,4 +753,3 @@ mm_modem_mode_from_qmi_radio_technology_preference (QmiNasRadioTechnologyPrefere
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)
@@ -763,3 +762,3 @@ mm_modem_mode_from_qmi_radio_technology_preference (QmiNasRadioTechnologyPrefere
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)
@@ -822,6 +821,2 @@ mm_modem_mode_from_qmi_rat_mode_preference (QmiNasRatModePreference qmi)
- /* Assume CS if 2G supported */
- if (mode & MM_MODEM_MODE_2G)
- mode |= MM_MODEM_MODE_CS;
-
return mode;