From ee8e81e55c187c3f1feca230d137fb25400a565e Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 30 Jan 2020 17:56:59 +0100 Subject: [PATCH] telit,helpers: use correct flag to check caps when building #BND request --- plugins/telit/mm-modem-helpers-telit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/telit/mm-modem-helpers-telit.c b/plugins/telit/mm-modem-helpers-telit.c index 14328cf9..bff9c0dd 100644 --- a/plugins/telit/mm-modem-helpers-telit.c +++ b/plugins/telit/mm-modem-helpers-telit.c @@ -225,19 +225,19 @@ mm_telit_build_bnd_request (GArray *bands_array, band = g_array_index (bands_array, MMModemBand, i); /* Convert 2G bands into a bitmask, to match against telit_2g_to_mm_band_mask. */ - if (flag2g && mm_common_band_is_gsm (band) && + if (modem_is_2g && mm_common_band_is_gsm (band) && (band >= MM_MODEM_BAND_TELIT_2G_FIRST) && (band <= MM_MODEM_BAND_TELIT_2G_LAST)) mask2g += B2G_FLAG (band); /* Convert 3G bands into a bitmask, to match against telit_3g_to_mm_band_mask. We use * a 64-bit explicit bitmask so that all values fit correctly. */ - if (flag3g && mm_common_band_is_utran (band) && + if (modem_is_3g && mm_common_band_is_utran (band) && (B3G_NUM (band) >= B3G_NUM (MM_MODEM_BAND_TELIT_3G_FIRST)) && (B3G_NUM (band) <= B3G_NUM (MM_MODEM_BAND_TELIT_3G_LAST))) mask3g += B3G_FLAG (band); /* Convert 4G bands into a bitmask. We use a 64bit explicit bitmask so that * all values fit correctly. */ - if (flag4g && mm_common_band_is_eutran (band) && + if (modem_is_4g && mm_common_band_is_eutran (band) && (band >= MM_MODEM_BAND_TELIT_4G_FIRST && band <= MM_MODEM_BAND_TELIT_4G_LAST)) mask4g += B4G_FLAG (band); }