summaryrefslogtreecommitdiffstats
path: root/plugins/huawei.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-01-06 19:16:43 -0800
committerMarcel Holtmann <marcel@holtmann.org>2012-01-06 19:16:43 -0800
commitc7ec6efa4e4dc51decfa1bd26e17a08948e616c0 (patch)
treef326471f499a7c4b4d460d25acbc542542449d7e /plugins/huawei.c
parent18a1fbca8408370add9abab908720b3e767432ae (diff)
downloadofono-c7ec6efa4e4dc51decfa1bd26e17a08948e616c0.tar.bz2
huawei: Use CFUN=5 for CDMA offline state handling
The Huawei CDMA modems only support CFUN=5 for offline mode and so enforce this one if CDMA support has been detected. Even if the modem would indicate AT^RFSWITCH support.
Diffstat (limited to 'plugins/huawei.c')
-rw-r--r--plugins/huawei.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/huawei.c b/plugins/huawei.c
index 73a8b19c..ea87f606 100644
--- a/plugins/huawei.c
+++ b/plugins/huawei.c
@@ -412,11 +412,17 @@ static void rfswitch_support(gboolean ok, GAtResult *result, gpointer user_data)
struct ofono_modem *modem = user_data;
struct huawei_data *data = ofono_modem_get_data(modem);
+ if (data->have_gsm == FALSE && data->have_cdma == TRUE) {
+ data->offline_command = "AT+CFUN=5";
+ goto done;
+ }
+
if (!ok)
data->offline_command = "AT+CFUN=5";
else
data->offline_command = "AT+CFUN=7";
+done:
g_at_chat_send(data->pcui, "AT+CFUN=1", none_prefix,
cfun_enable, modem, NULL);
}