aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-06-02 10:16:33 +0200
committerAleksander Morgado <aleksander@aleksander.es>2020-06-02 10:16:33 +0200
commitd36df682264698e6c33a6c7e79e1f11ec142b609 (patch)
tree22b175149df6d07b34c5e6cb06182949c8fc3a3c
parenta6607a5e7dc5ac036f416bb405d37e5c22691ec1 (diff)
wavecom: break loop matching 2G bands if exact combination found
-rw-r--r--plugins/wavecom/mm-broadband-modem-wavecom.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/wavecom/mm-broadband-modem-wavecom.c b/plugins/wavecom/mm-broadband-modem-wavecom.c
index d02dd2ac..43919edf 100644
--- a/plugins/wavecom/mm-broadband-modem-wavecom.c
+++ b/plugins/wavecom/mm-broadband-modem-wavecom.c
@@ -851,8 +851,10 @@ set_bands_2g (GTask *task,
g_array_append_vals (supported_combination, bands_2g[i].mm_bands, bands_2g[i].n_mm_bands);
/* Check if the given array is exactly one of the supported combinations */
- if (mm_common_bands_garray_cmp (bands_array_final, supported_combination))
+ if (mm_common_bands_garray_cmp (bands_array_final, supported_combination)) {
wavecom_band = bands_2g[i].wavecom_band;
+ break;
+ }
}
if (wavecom_band == '\0') {