ublox: fix 'any' mode building
The 'any' mode refers to the mode which includes most access
technologies and where none of them is preferred.
Fix the logic so that all combinations with one technology preferred
over the others are ignored, instead of the other way around.
Fixes assertion with the 4G-only LARA R204.
ModemManager[424]: <debug> [-192499452.090358] (ttyACM0): --> 'AT+URAT=?<CR>'
ModemManager[424]: <debug> [-192499452.092150] (ttyACM0): <-- '<CR><LF>+URAT: (3)<CR><LF><CR><LF>OK<CR><LF>'
**
ERROR:ublox/mm-modem-helpers-ublox.c:817:mm_ublox_get_modem_mode_any: assertion failed: (any != MM_MODEM_MODE_NONE)
Reported-by: Matthew Starr <mstarr@hedonline.com>
This commit is contained in:
@@ -802,7 +802,7 @@ mm_ublox_get_modem_mode_any (const GArray *combinations)
|
||||
guint bits_set;
|
||||
|
||||
combination = &g_array_index (combinations, MMModemModeCombination, i);
|
||||
if (combination->preferred == MM_MODEM_MODE_NONE)
|
||||
if (combination->preferred != MM_MODEM_MODE_NONE)
|
||||
continue;
|
||||
bits_set = mm_count_bits_set (combination->allowed);
|
||||
if (bits_set > any_bits_set) {
|
||||
|
||||
Reference in New Issue
Block a user