diff options
author | Dan Williams <dcbw@redhat.com> | 2013-02-15 13:40:01 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2013-02-15 13:40:01 -0600 |
commit | 253242256c951f60f4dfbae451d68b9c3374450b (patch) | |
tree | e4cbb2f0683775e53b988191aa671a5823092836 /plugins | |
parent | 85b67ed8d9ecc76062777f63a61ade28074f1fa9 (diff) |
broadband-modem-longcheer: fix getting and setting of allowed modes
When setting allowed modes, a ",2" crept into the MODODR command when
porting the plugin from 0.6. That shouldn't be there.
When getting allowed modes, 2 is UMTS preferred and 4 is GSM preferred,
which the previous code combined into only UMTS preferred.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/longcheer/mm-broadband-modem-longcheer.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/longcheer/mm-broadband-modem-longcheer.c b/plugins/longcheer/mm-broadband-modem-longcheer.c index ac05505c..949d54d8 100644 --- a/plugins/longcheer/mm-broadband-modem-longcheer.c +++ b/plugins/longcheer/mm-broadband-modem-longcheer.c @@ -67,15 +67,22 @@ load_allowed_modes_finish (MMIfaceModem *self, mododr = atoi (str); switch (mododr) { case 1: + /* UMTS only */ *allowed = MM_MODEM_MODE_3G; *preferred = MM_MODEM_MODE_NONE; return TRUE; case 2: - case 4: + /* UMTS preferred */ *allowed = (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G); *preferred = MM_MODEM_MODE_3G; return TRUE; + case 4: + /* GSM preferred */ + *allowed = (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G); + *preferred = MM_MODEM_MODE_2G; + return TRUE; case 3: + /* GSM only */ *allowed = MM_MODEM_MODE_2G; *preferred = MM_MODEM_MODE_NONE; return TRUE; @@ -182,7 +189,7 @@ set_allowed_modes (MMIfaceModem *self, return; } - command = g_strdup_printf ("+MODODR=%d,2", mododr); + command = g_strdup_printf ("+MODODR=%d", mododr); mm_base_modem_at_command ( MM_BASE_MODEM (self), command, |