diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-11-18 12:08:14 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-11-18 12:09:42 -0600 |
commit | 446b9e645d8cc994fa25ae466e563c2b9c247aa6 (patch) | |
tree | 54b8c4fce00c7c869e437bb1d55071711f16c71a /plugins | |
parent | 16834cc0058f1f5559b79e2a4cc07a159522d8ef (diff) | |
download | ofono-446b9e645d8cc994fa25ae466e563c2b9c247aa6.tar.bz2 |
Fix: modem _disable needs to send the CFUN
For Huawei driver
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/huawei.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/huawei.c b/plugins/huawei.c index 28b7650e..08f0e01a 100644 --- a/plugins/huawei.c +++ b/plugins/huawei.c @@ -127,9 +127,14 @@ static int huawei_enable(struct ofono_modem *modem) static void cfun_disable(gboolean ok, GAtResult *result, gpointer user_data) { struct ofono_modem *modem = user_data; + struct huawei_data *data = ofono_modem_get_data(modem); DBG(""); + g_at_chat_shutdown(data->chat); + g_at_chat_unref(data->chat); + data->chat = NULL; + if (ok) ofono_modem_set_powered(modem, FALSE); } @@ -146,12 +151,7 @@ static int huawei_disable(struct ofono_modem *modem) g_at_chat_send(data->chat, "AT+CFUN=0", NULL, cfun_disable, modem, NULL); - g_at_chat_shutdown(data->chat); - - g_at_chat_unref(data->chat); - data->chat = NULL; - - return 0; + return -EINPROGRESS; } static void huawei_pre_sim(struct ofono_modem *modem) |