diff options
author | Ben Chan <benchan@chromium.org> | 2017-06-28 00:13:22 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-06-28 18:21:25 +0200 |
commit | 989ade7b8c2f8add2b670294453d2a93463b42f2 (patch) | |
tree | 36df4fed8291d57d4ea6367f7f8e631993391c4a /plugins | |
parent | 0fb0184a2f2c11927ef095fba71e0725e5a6e5e2 (diff) |
enums: replace Roman numeral suffixes in MM_MODEM_BAND_EUTRAN_*
3GPP TS 36.101 Table 5.5-1 refers the E-UTRA operating bands as 1, 2, 3,
..., etc.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/altair/mm-modem-helpers-altair-lte.c | 4 | ||||
-rw-r--r-- | plugins/altair/tests/test-modem-helpers-altair-lte.c | 8 | ||||
-rw-r--r-- | plugins/telit/mm-modem-helpers-telit.c | 6 | ||||
-rw-r--r-- | plugins/telit/tests/test-mm-modem-helpers-telit.c | 24 | ||||
-rw-r--r-- | plugins/ublox/mm-modem-helpers-ublox.c | 20 | ||||
-rw-r--r-- | plugins/ublox/tests/test-modem-helpers-ublox.c | 62 |
6 files changed, 62 insertions, 62 deletions
diff --git a/plugins/altair/mm-modem-helpers-altair-lte.c b/plugins/altair/mm-modem-helpers-altair-lte.c index 3e52ee9c..ce652d1b 100644 --- a/plugins/altair/mm-modem-helpers-altair-lte.c +++ b/plugins/altair/mm-modem-helpers-altair-lte.c @@ -50,12 +50,12 @@ mm_altair_parse_bands_response (const gchar *response) MMModemBand band; band_value = (guint32)strtoul (split[i], NULL, 10); - band = MM_MODEM_BAND_EUTRAN_I - 1 + band_value; + band = MM_MODEM_BAND_EUTRAN_1 - 1 + band_value; /* Due to a firmware issue, the modem may incorrectly includes 0 in the * bands response. We thus ignore any band value outside the range of * E-UTRAN operating bands. */ - if (band >= MM_MODEM_BAND_EUTRAN_I && band <= MM_MODEM_BAND_EUTRAN_XLIV) + if (band >= MM_MODEM_BAND_EUTRAN_1 && band <= MM_MODEM_BAND_EUTRAN_44) g_array_append_val (bands, band); } diff --git a/plugins/altair/tests/test-modem-helpers-altair-lte.c b/plugins/altair/tests/test-modem-helpers-altair-lte.c index 4d038ce1..a4901cd6 100644 --- a/plugins/altair/tests/test-modem-helpers-altair-lte.c +++ b/plugins/altair/tests/test-modem-helpers-altair-lte.c @@ -43,10 +43,10 @@ test_parse_bands (void) bands = mm_altair_parse_bands_response ("0, 0, 1, 4,13,44,45"); g_assert (bands != NULL); g_assert_cmpuint (bands->len, ==, 4); - g_assert_cmpuint (g_array_index (bands, MMModemBand, 0), ==, MM_MODEM_BAND_EUTRAN_I); - g_assert_cmpuint (g_array_index (bands, MMModemBand, 1), ==, MM_MODEM_BAND_EUTRAN_IV); - g_assert_cmpuint (g_array_index (bands, MMModemBand, 2), ==, MM_MODEM_BAND_EUTRAN_XIII); - g_assert_cmpuint (g_array_index (bands, MMModemBand, 3), ==, MM_MODEM_BAND_EUTRAN_XLIV); + g_assert_cmpuint (g_array_index (bands, MMModemBand, 0), ==, MM_MODEM_BAND_EUTRAN_1); + g_assert_cmpuint (g_array_index (bands, MMModemBand, 1), ==, MM_MODEM_BAND_EUTRAN_4); + g_assert_cmpuint (g_array_index (bands, MMModemBand, 2), ==, MM_MODEM_BAND_EUTRAN_13); + g_assert_cmpuint (g_array_index (bands, MMModemBand, 3), ==, MM_MODEM_BAND_EUTRAN_44); g_array_free (bands, TRUE); } diff --git a/plugins/telit/mm-modem-helpers-telit.c b/plugins/telit/mm-modem-helpers-telit.c index 5a7ecb79..3b227044 100644 --- a/plugins/telit/mm-modem-helpers-telit.c +++ b/plugins/telit/mm-modem-helpers-telit.c @@ -57,8 +57,8 @@ mm_telit_get_band_flag (GArray *bands_array, } if (flag4g != NULL && - band >= MM_MODEM_BAND_EUTRAN_I && band <= MM_MODEM_BAND_EUTRAN_XLIV) { - mask4g += 1 << (band - MM_MODEM_BAND_EUTRAN_I); + band >= MM_MODEM_BAND_EUTRAN_1 && band <= MM_MODEM_BAND_EUTRAN_44) { + mask4g += 1 << (band - MM_MODEM_BAND_EUTRAN_1); found4g = TRUE; } } @@ -480,7 +480,7 @@ mm_telit_get_4g_mm_bands(GMatchInfo *match_info, for (i = 0; value > 0; i++) { if (value % 2 != 0) { - band = MM_MODEM_BAND_EUTRAN_I + i; + band = MM_MODEM_BAND_EUTRAN_1 + i; g_array_append_val (*bands, band); } value = value >> 1; diff --git a/plugins/telit/tests/test-mm-modem-helpers-telit.c b/plugins/telit/tests/test-mm-modem-helpers-telit.c index e42467ea..1a43846d 100644 --- a/plugins/telit/tests/test-mm-modem-helpers-telit.c +++ b/plugins/telit/tests/test-mm-modem-helpers-telit.c @@ -189,14 +189,14 @@ static BNDResponseTest supported_band_mapping_tests [] = { MM_MODEM_BAND_U2100, MM_MODEM_BAND_U850, MM_MODEM_BAND_U900, - MM_MODEM_BAND_EUTRAN_I} }, + MM_MODEM_BAND_EUTRAN_1} }, { "#BND: (0),(0),(1-3)", TRUE, TRUE, TRUE, 5, { MM_MODEM_BAND_EGSM, MM_MODEM_BAND_DCS, MM_MODEM_BAND_U2100, - MM_MODEM_BAND_EUTRAN_I, - MM_MODEM_BAND_EUTRAN_II} }, - { "#BND: (0),(0),(1-3)", FALSE, FALSE, TRUE, 2, { MM_MODEM_BAND_EUTRAN_I, - MM_MODEM_BAND_EUTRAN_II} }, + MM_MODEM_BAND_EUTRAN_1, + MM_MODEM_BAND_EUTRAN_2} }, + { "#BND: (0),(0),(1-3)", FALSE, FALSE, TRUE, 2, { MM_MODEM_BAND_EUTRAN_1, + MM_MODEM_BAND_EUTRAN_2} }, { NULL, FALSE, FALSE, FALSE, 0, {}}, }; @@ -261,17 +261,17 @@ static BNDResponseTest current_band_mapping_tests [] = { { "#BND: 3,0,1", TRUE, TRUE, TRUE, 4, { MM_MODEM_BAND_PCS, MM_MODEM_BAND_G850, MM_MODEM_BAND_U2100, - MM_MODEM_BAND_EUTRAN_I + MM_MODEM_BAND_EUTRAN_1 } }, { "#BND: 0,0,3", TRUE, FALSE, TRUE, 4, { MM_MODEM_BAND_EGSM, MM_MODEM_BAND_DCS, - MM_MODEM_BAND_EUTRAN_I, - MM_MODEM_BAND_EUTRAN_II + MM_MODEM_BAND_EUTRAN_1, + MM_MODEM_BAND_EUTRAN_2 } }, - { "#BND: 0,0,3", FALSE, FALSE, TRUE, 2, { MM_MODEM_BAND_EUTRAN_I, - MM_MODEM_BAND_EUTRAN_II + { "#BND: 0,0,3", FALSE, FALSE, TRUE, 2, { MM_MODEM_BAND_EUTRAN_1, + MM_MODEM_BAND_EUTRAN_2 } }, { NULL, FALSE, FALSE, FALSE, 0, {}}, @@ -471,8 +471,8 @@ static void test_telit_get_4g_bnd_flag (void) { GArray *bands_array; - MMModemBand eutran_i = MM_MODEM_BAND_EUTRAN_I; - MMModemBand eutran_ii = MM_MODEM_BAND_EUTRAN_II; + MMModemBand eutran_i = MM_MODEM_BAND_EUTRAN_1; + MMModemBand eutran_ii = MM_MODEM_BAND_EUTRAN_2; MMModemBand egsm = MM_MODEM_BAND_EGSM; gint flag = -1; diff --git a/plugins/ublox/mm-modem-helpers-ublox.c b/plugins/ublox/mm-modem-helpers-ublox.c index 96ac4702..bee1a8f0 100644 --- a/plugins/ublox/mm-modem-helpers-ublox.c +++ b/plugins/ublox/mm-modem-helpers-ublox.c @@ -552,55 +552,55 @@ typedef struct { static const BandConfiguration band_configuration[] = { { .ubandsel_value = 700, - .bands_4g = { MM_MODEM_BAND_EUTRAN_XIII, MM_MODEM_BAND_EUTRAN_XVII } + .bands_4g = { MM_MODEM_BAND_EUTRAN_13, MM_MODEM_BAND_EUTRAN_17 } }, { .ubandsel_value = 800, .bands_3g = { MM_MODEM_BAND_U800 }, - .bands_4g = { MM_MODEM_BAND_EUTRAN_XX } + .bands_4g = { MM_MODEM_BAND_EUTRAN_20 } }, { .ubandsel_value = 850, .bands_2g = { MM_MODEM_BAND_G850 }, .bands_3g = { MM_MODEM_BAND_U850 }, - .bands_4g = { MM_MODEM_BAND_EUTRAN_V } + .bands_4g = { MM_MODEM_BAND_EUTRAN_5 } }, { .ubandsel_value = 900, .bands_2g = { MM_MODEM_BAND_EGSM }, .bands_3g = { MM_MODEM_BAND_U900 }, - .bands_4g = { MM_MODEM_BAND_EUTRAN_VIII } + .bands_4g = { MM_MODEM_BAND_EUTRAN_8 } }, { .ubandsel_value = 1500, - .bands_4g = { MM_MODEM_BAND_EUTRAN_XI } + .bands_4g = { MM_MODEM_BAND_EUTRAN_11 } }, { .ubandsel_value = 1700, .bands_3g = { MM_MODEM_BAND_U17IV }, - .bands_4g = { MM_MODEM_BAND_EUTRAN_IV } + .bands_4g = { MM_MODEM_BAND_EUTRAN_4 } }, { .ubandsel_value = 1800, .bands_2g = { MM_MODEM_BAND_DCS }, .bands_3g = { MM_MODEM_BAND_U1800 }, - .bands_4g = { MM_MODEM_BAND_EUTRAN_III } + .bands_4g = { MM_MODEM_BAND_EUTRAN_3 } }, { .ubandsel_value = 1900, .bands_2g = { MM_MODEM_BAND_PCS }, .bands_3g = { MM_MODEM_BAND_U1900 }, - .bands_4g = { MM_MODEM_BAND_EUTRAN_II } + .bands_4g = { MM_MODEM_BAND_EUTRAN_2 } }, { .ubandsel_value = 2100, .bands_3g = { MM_MODEM_BAND_U2100 }, - .bands_4g = { MM_MODEM_BAND_EUTRAN_I } + .bands_4g = { MM_MODEM_BAND_EUTRAN_1 } }, { .ubandsel_value = 2600, .bands_3g = { MM_MODEM_BAND_U2600 }, - .bands_4g = { MM_MODEM_BAND_EUTRAN_VII } + .bands_4g = { MM_MODEM_BAND_EUTRAN_7 } }, }; diff --git a/plugins/ublox/tests/test-modem-helpers-ublox.c b/plugins/ublox/tests/test-modem-helpers-ublox.c index 703e915b..286a58af 100644 --- a/plugins/ublox/tests/test-modem-helpers-ublox.c +++ b/plugins/ublox/tests/test-modem-helpers-ublox.c @@ -520,16 +520,16 @@ test_supported_bands_all (void) { /* All 2G, 3G and 4G bands */ const MMModemBand expected_bands[] = { - /* 700 */ MM_MODEM_BAND_EUTRAN_XIII, MM_MODEM_BAND_EUTRAN_XVII, - /* 800 */ MM_MODEM_BAND_U800, MM_MODEM_BAND_EUTRAN_XX, - /* 850 */ MM_MODEM_BAND_G850, MM_MODEM_BAND_U850, MM_MODEM_BAND_EUTRAN_V, - /* 900 */ MM_MODEM_BAND_EGSM, MM_MODEM_BAND_U900, MM_MODEM_BAND_EUTRAN_VIII, - /* 1500 */ MM_MODEM_BAND_EUTRAN_XI, - /* 1700 */ MM_MODEM_BAND_U17IV, MM_MODEM_BAND_EUTRAN_IV, - /* 1800 */ MM_MODEM_BAND_DCS, MM_MODEM_BAND_U1800, MM_MODEM_BAND_EUTRAN_III, - /* 1900 */ MM_MODEM_BAND_PCS, MM_MODEM_BAND_U1900, MM_MODEM_BAND_EUTRAN_II, - /* 2100 */ MM_MODEM_BAND_U2100, MM_MODEM_BAND_EUTRAN_I, - /* 2600 */ MM_MODEM_BAND_U2600, MM_MODEM_BAND_EUTRAN_VII, + /* 700 */ MM_MODEM_BAND_EUTRAN_13, MM_MODEM_BAND_EUTRAN_17, + /* 800 */ MM_MODEM_BAND_U800, MM_MODEM_BAND_EUTRAN_20, + /* 850 */ MM_MODEM_BAND_G850, MM_MODEM_BAND_U850, MM_MODEM_BAND_EUTRAN_5, + /* 900 */ MM_MODEM_BAND_EGSM, MM_MODEM_BAND_U900, MM_MODEM_BAND_EUTRAN_8, + /* 1500 */ MM_MODEM_BAND_EUTRAN_11, + /* 1700 */ MM_MODEM_BAND_U17IV, MM_MODEM_BAND_EUTRAN_4, + /* 1800 */ MM_MODEM_BAND_DCS, MM_MODEM_BAND_U1800, MM_MODEM_BAND_EUTRAN_3, + /* 1900 */ MM_MODEM_BAND_PCS, MM_MODEM_BAND_U1900, MM_MODEM_BAND_EUTRAN_2, + /* 2100 */ MM_MODEM_BAND_U2100, MM_MODEM_BAND_EUTRAN_1, + /* 2600 */ MM_MODEM_BAND_U2600, MM_MODEM_BAND_EUTRAN_7, }; common_validate_supported_bands (NULL, expected_bands, G_N_ELEMENTS (expected_bands)); @@ -540,16 +540,16 @@ test_supported_bands_toby_l201 (void) { /* Only 3G and 4G bands */ const MMModemBand expected_bands[] = { - /* 700 */ MM_MODEM_BAND_EUTRAN_XIII, MM_MODEM_BAND_EUTRAN_XVII, - /* 800 */ MM_MODEM_BAND_U800, MM_MODEM_BAND_EUTRAN_XX, - /* 850 */ MM_MODEM_BAND_U850, MM_MODEM_BAND_EUTRAN_V, - /* 900 */ MM_MODEM_BAND_U900, MM_MODEM_BAND_EUTRAN_VIII, - /* 1500 */ MM_MODEM_BAND_EUTRAN_XI, - /* 1700 */ MM_MODEM_BAND_U17IV, MM_MODEM_BAND_EUTRAN_IV, - /* 1800 */ MM_MODEM_BAND_U1800, MM_MODEM_BAND_EUTRAN_III, - /* 1900 */ MM_MODEM_BAND_U1900, MM_MODEM_BAND_EUTRAN_II, - /* 2100 */ MM_MODEM_BAND_U2100, MM_MODEM_BAND_EUTRAN_I, - /* 2600 */ MM_MODEM_BAND_U2600, MM_MODEM_BAND_EUTRAN_VII, + /* 700 */ MM_MODEM_BAND_EUTRAN_13, MM_MODEM_BAND_EUTRAN_17, + /* 800 */ MM_MODEM_BAND_U800, MM_MODEM_BAND_EUTRAN_20, + /* 850 */ MM_MODEM_BAND_U850, MM_MODEM_BAND_EUTRAN_5, + /* 900 */ MM_MODEM_BAND_U900, MM_MODEM_BAND_EUTRAN_8, + /* 1500 */ MM_MODEM_BAND_EUTRAN_11, + /* 1700 */ MM_MODEM_BAND_U17IV, MM_MODEM_BAND_EUTRAN_4, + /* 1800 */ MM_MODEM_BAND_U1800, MM_MODEM_BAND_EUTRAN_3, + /* 1900 */ MM_MODEM_BAND_U1900, MM_MODEM_BAND_EUTRAN_2, + /* 2100 */ MM_MODEM_BAND_U2100, MM_MODEM_BAND_EUTRAN_1, + /* 2600 */ MM_MODEM_BAND_U2600, MM_MODEM_BAND_EUTRAN_7, }; common_validate_supported_bands ("TOBY-L201", expected_bands, G_N_ELEMENTS (expected_bands)); @@ -627,10 +627,10 @@ static void test_ubandsel_response_four (void) { const MMModemBand expected_bands[] = { - /* 850 */ MM_MODEM_BAND_G850, MM_MODEM_BAND_U850, MM_MODEM_BAND_EUTRAN_V, - /* 900 */ MM_MODEM_BAND_EGSM, MM_MODEM_BAND_U900, MM_MODEM_BAND_EUTRAN_VIII, - /* 1800 */ MM_MODEM_BAND_DCS, MM_MODEM_BAND_U1800, MM_MODEM_BAND_EUTRAN_III, - /* 1900 */ MM_MODEM_BAND_PCS, MM_MODEM_BAND_U1900, MM_MODEM_BAND_EUTRAN_II, + /* 850 */ MM_MODEM_BAND_G850, MM_MODEM_BAND_U850, MM_MODEM_BAND_EUTRAN_5, + /* 900 */ MM_MODEM_BAND_EGSM, MM_MODEM_BAND_U900, MM_MODEM_BAND_EUTRAN_8, + /* 1800 */ MM_MODEM_BAND_DCS, MM_MODEM_BAND_U1800, MM_MODEM_BAND_EUTRAN_3, + /* 1900 */ MM_MODEM_BAND_PCS, MM_MODEM_BAND_U1900, MM_MODEM_BAND_EUTRAN_2, }; common_validate_ubandsel_response ("+UBANDSEL: 850,900,1800,1900\r\n", expected_bands, G_N_ELEMENTS (expected_bands)); @@ -640,9 +640,9 @@ static void test_ubandsel_response_three (void) { const MMModemBand expected_bands[] = { - /* 850 */ MM_MODEM_BAND_G850, MM_MODEM_BAND_U850, MM_MODEM_BAND_EUTRAN_V, - /* 900 */ MM_MODEM_BAND_EGSM, MM_MODEM_BAND_U900, MM_MODEM_BAND_EUTRAN_VIII, - /* 1800 */ MM_MODEM_BAND_DCS, MM_MODEM_BAND_U1800, MM_MODEM_BAND_EUTRAN_III, + /* 850 */ MM_MODEM_BAND_G850, MM_MODEM_BAND_U850, MM_MODEM_BAND_EUTRAN_5, + /* 900 */ MM_MODEM_BAND_EGSM, MM_MODEM_BAND_U900, MM_MODEM_BAND_EUTRAN_8, + /* 1800 */ MM_MODEM_BAND_DCS, MM_MODEM_BAND_U1800, MM_MODEM_BAND_EUTRAN_3, }; common_validate_ubandsel_response ("+UBANDSEL: 850,900,1800\r\n", expected_bands, G_N_ELEMENTS (expected_bands)); @@ -652,8 +652,8 @@ static void test_ubandsel_response_two (void) { const MMModemBand expected_bands[] = { - /* 850 */ MM_MODEM_BAND_G850, MM_MODEM_BAND_U850, MM_MODEM_BAND_EUTRAN_V, - /* 900 */ MM_MODEM_BAND_EGSM, MM_MODEM_BAND_U900, MM_MODEM_BAND_EUTRAN_VIII, + /* 850 */ MM_MODEM_BAND_G850, MM_MODEM_BAND_U850, MM_MODEM_BAND_EUTRAN_5, + /* 900 */ MM_MODEM_BAND_EGSM, MM_MODEM_BAND_U900, MM_MODEM_BAND_EUTRAN_8, }; common_validate_ubandsel_response ("+UBANDSEL: 850,900\r\n", expected_bands, G_N_ELEMENTS (expected_bands)); @@ -663,7 +663,7 @@ static void test_ubandsel_response_one (void) { const MMModemBand expected_bands[] = { - /* 850 */ MM_MODEM_BAND_G850, MM_MODEM_BAND_U850, MM_MODEM_BAND_EUTRAN_V, + /* 850 */ MM_MODEM_BAND_G850, MM_MODEM_BAND_U850, MM_MODEM_BAND_EUTRAN_5, }; common_validate_ubandsel_response ("+UBANDSEL: 850\r\n", expected_bands, G_N_ELEMENTS (expected_bands)); @@ -718,7 +718,7 @@ static void test_ubandsel_request_1800 (void) { const MMModemBand bands[] = { - MM_MODEM_BAND_DCS, MM_MODEM_BAND_U1800, MM_MODEM_BAND_EUTRAN_III + MM_MODEM_BAND_DCS, MM_MODEM_BAND_U1800, MM_MODEM_BAND_EUTRAN_3 }; common_validate_ubandsel_request (bands, G_N_ELEMENTS (bands), "+UBANDSEL=1800"); |