From 2896e711ae8d4ae5b2188c963aeb8456ff2189fe Mon Sep 17 00:00:00 2001 From: David Castellanos Date: Tue, 26 Mar 2013 16:24:40 +0100 Subject: x22x: Fix problem in set allowed mode NM attempts to set allowed and preferred mode during the connection process. The plugin x220x does not handle properly when NM request allowed mode to '2g, 3g' and the preferred mode to 'none'. This commit attempts to solve the problem described above. When this situation happens, establish the mode of the modem has 'ANY' (which seems the safest one) instead of just throwing an error. Signed-off-by: David Castellanos --- plugins/x22x/mm-broadband-modem-x22x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/x22x/mm-broadband-modem-x22x.c b/plugins/x22x/mm-broadband-modem-x22x.c index f61845a7..758e8f3d 100644 --- a/plugins/x22x/mm-broadband-modem-x22x.c +++ b/plugins/x22x/mm-broadband-modem-x22x.c @@ -160,6 +160,8 @@ set_allowed_modes (MMIfaceModem *self, else if (allowed == MM_MODEM_MODE_ANY && preferred == MM_MODEM_MODE_NONE) syssel = 0; + else if (allowed == (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G)) + syssel = 0; else { gchar *allowed_str; gchar *preferred_str; -- cgit v1.2.3