[PATCH 7/8] cinterion: update frequency bands support
Aleksander Morgado
aleksander at aleksander.es
Tue Aug 22 06:18:14 UTC 2017
Updated to use the non-deprecated MMModemBand values.
---
plugins/cinterion/mm-modem-helpers-cinterion.c | 18 +++++-----
.../cinterion/tests/test-modem-helpers-cinterion.c | 40 +++++++++++-----------
2 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/plugins/cinterion/mm-modem-helpers-cinterion.c b/plugins/cinterion/mm-modem-helpers-cinterion.c
index 3c7a0a0c..34b5cc84 100644
--- a/plugins/cinterion/mm-modem-helpers-cinterion.c
+++ b/plugins/cinterion/mm-modem-helpers-cinterion.c
@@ -42,15 +42,15 @@ typedef struct {
* set, so you shouldn't for example set 3G frequency bands, and then use a
* 2G-only allowed mode. */
static const CinterionBand cinterion_bands[] = {
- { (1 << 0), MM_MODEM_BAND_EGSM },
- { (1 << 1), MM_MODEM_BAND_DCS },
- { (1 << 2), MM_MODEM_BAND_PCS },
- { (1 << 3), MM_MODEM_BAND_G850 },
- { (1 << 4), MM_MODEM_BAND_U2100 },
- { (1 << 5), MM_MODEM_BAND_U1900 },
- { (1 << 6), MM_MODEM_BAND_U850 },
- { (1 << 7), MM_MODEM_BAND_U900 },
- { (1 << 8), MM_MODEM_BAND_U800 }
+ { (1 << 0), MM_MODEM_BAND_EGSM },
+ { (1 << 1), MM_MODEM_BAND_DCS },
+ { (1 << 2), MM_MODEM_BAND_PCS },
+ { (1 << 3), MM_MODEM_BAND_G850 },
+ { (1 << 4), MM_MODEM_BAND_UTRAN_1 },
+ { (1 << 5), MM_MODEM_BAND_UTRAN_2 },
+ { (1 << 6), MM_MODEM_BAND_UTRAN_5 },
+ { (1 << 7), MM_MODEM_BAND_UTRAN_8 },
+ { (1 << 8), MM_MODEM_BAND_UTRAN_6 }
};
/* Check valid combinations in 2G-only devices */
diff --git a/plugins/cinterion/tests/test-modem-helpers-cinterion.c b/plugins/cinterion/tests/test-modem-helpers-cinterion.c
index 6b5cca48..2806ec45 100644
--- a/plugins/cinterion/tests/test-modem-helpers-cinterion.c
+++ b/plugins/cinterion/tests/test-modem-helpers-cinterion.c
@@ -103,15 +103,15 @@ test_scfg (void)
"^SCFG: \"URC/Ringline/ActiveTime\",(\"0\",\"1\",\"2\",\"keep\")\r\n";
expected_bands = g_array_sized_new (FALSE, FALSE, sizeof (MMModemBand), 9);
- single = MM_MODEM_BAND_EGSM, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_DCS, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_PCS, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_G850, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_U2100, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_U1900, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_U850, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_U900, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_U800, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_EGSM, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_DCS, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_PCS, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_G850, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_UTRAN_1, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_UTRAN_2, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_UTRAN_5, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_UTRAN_8, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_UTRAN_6, g_array_append_val (expected_bands, single);
common_test_scfg (response, expected_bands);
@@ -176,10 +176,10 @@ test_scfg_ehs5 (void)
"^SCFG: \"Userware/Watchdog\",(\"0\",\"1\",\"2\")\r\n";
expected_bands = g_array_sized_new (FALSE, FALSE, sizeof (MMModemBand), 4);
- single = MM_MODEM_BAND_EGSM, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_DCS, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_U2100, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_U900, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_EGSM, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_DCS, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_UTRAN_1, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_UTRAN_8, g_array_append_val (expected_bands, single);
common_test_scfg (response, expected_bands);
@@ -267,13 +267,13 @@ test_scfg_response_3g (void)
"\r\n";
expected_bands = g_array_sized_new (FALSE, FALSE, sizeof (MMModemBand), 9);
- single = MM_MODEM_BAND_EGSM, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_DCS, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_PCS, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_G850, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_U2100, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_U1900, g_array_append_val (expected_bands, single);
- single = MM_MODEM_BAND_U850, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_EGSM, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_DCS, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_PCS, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_G850, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_UTRAN_1, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_UTRAN_2, g_array_append_val (expected_bands, single);
+ single = MM_MODEM_BAND_UTRAN_5, g_array_append_val (expected_bands, single);
common_test_scfg_response (response, MM_MODEM_CHARSET_UNKNOWN, expected_bands);
--
2.14.1
More information about the ModemManager-devel
mailing list