diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2019-09-09 15:01:56 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2019-09-17 10:52:42 +0200 |
commit | be4fa661c12a45b4b6c278c3906e7c126ddae3e8 (patch) | |
tree | 4e25caf386e634874ef571db053701898a35695a /libmm-glib/mm-common-helpers.c | |
parent | 40521e315fc8cc94837c1508dca94efeed939f82 (diff) |
plugins,telit: refactor #BND command support
And added support for several new things, including:
* Setting "any" band now attempts to set all supported bands.
* Added new 2G band value '5' (egsm+dcs+pcs+g850).
* Setup support for two different 3G band combinations, a default one
plus an alternate one applicable to the LM940/960 models only. The
alternate combination is selected via udev tags.
During the refactor, the following Telit-specific helpers were also
removed and exchanged with more generic counterparts.
* mm_telit_bands_contains() -> mm_common_bands_garray_lookup()
* mm_telit_get_band_flags_from_string() -> mm_parse_uint_list()
Diffstat (limited to 'libmm-glib/mm-common-helpers.c')
-rw-r--r-- | libmm-glib/mm-common-helpers.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libmm-glib/mm-common-helpers.c b/libmm-glib/mm-common-helpers.c index a3cd16ab..8673421d 100644 --- a/libmm-glib/mm-common-helpers.c +++ b/libmm-glib/mm-common-helpers.c @@ -722,6 +722,20 @@ mm_common_bands_garray_cmp (GArray *a, GArray *b) return !different; } +gboolean +mm_common_bands_garray_lookup (GArray *array, + MMModemBand value) +{ + guint i; + + for (i = 0; i < array->len; i++) { + if (value == g_array_index (array, MMModemBand, i)) + return TRUE; + } + + return FALSE; +} + void mm_common_bands_garray_sort (GArray *array) { |