From e0f1249fcc10bb8dab8971471d7815f155113afe Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 25 Jul 2011 01:34:41 +0200 Subject: huawei: Remove broken handling for NDIS support --- plugins/huawei.c | 37 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 26 deletions(-) (limited to 'plugins/huawei.c') diff --git a/plugins/huawei.c b/plugins/huawei.c index d6614976..42e3f4ae 100644 --- a/plugins/huawei.c +++ b/plugins/huawei.c @@ -76,7 +76,6 @@ struct huawei_data { enum huawei_sim_state sim_state; const char *cfun_offline_mode; gboolean voice; - gboolean ndis; guint sim_poll_timeout; guint sim_poll_count; }; @@ -384,13 +383,11 @@ static void cvoice_support_cb(gboolean ok, GAtResult *result, static void shutdown_device(struct huawei_data *data) { - if (data->modem) { - g_at_chat_cancel_all(data->modem); - g_at_chat_unregister_all(data->modem); + g_at_chat_cancel_all(data->modem); + g_at_chat_unregister_all(data->modem); - g_at_chat_unref(data->modem); - data->modem = NULL; - } + g_at_chat_unref(data->modem); + data->modem = NULL; g_at_chat_cancel_all(data->pcui); g_at_chat_unregister_all(data->pcui); @@ -531,15 +528,12 @@ static int huawei_enable(struct ofono_modem *modem) DBG("%p", modem); - if (ofono_modem_get_string(modem, "NDIS") == NULL) { - data->modem = open_device(modem, "Modem", "Modem: "); - if (data->modem == NULL) - return -EINVAL; + data->modem = open_device(modem, "Modem", "Modem: "); + if (data->modem == NULL) + return -EINVAL; - g_at_chat_send(data->modem, "ATE0 &C0 +CMEE=1", NULL, + g_at_chat_send(data->modem, "ATE0 &C0 +CMEE=1", NULL, NULL, NULL, NULL); - } else - data->ndis = TRUE; data->pcui = open_device(modem, "Pcui", "PCUI: "); if (data->pcui == NULL) { @@ -588,10 +582,8 @@ static int huawei_disable(struct ofono_modem *modem) data->sim_poll_timeout = 0; } - if (data->modem) { - g_at_chat_cancel_all(data->modem); - g_at_chat_unregister_all(data->modem); - } + g_at_chat_cancel_all(data->modem); + g_at_chat_unregister_all(data->modem); g_at_chat_cancel_all(data->pcui); g_at_chat_unregister_all(data->pcui); @@ -685,15 +677,8 @@ static void huawei_post_online(struct ofono_modem *modem) gprs = ofono_gprs_create(modem, OFONO_VENDOR_HUAWEI, "atmodem", data->pcui); - - if (data->ndis == TRUE) - gc = ofono_gprs_context_create(modem, 0, - "huaweimodem", data->pcui); - else if (data->modem != NULL) - gc = ofono_gprs_context_create(modem, 0, + gc = ofono_gprs_context_create(modem, 0, "atmodem", data->modem); - else - gc = NULL; if (gprs && gc) ofono_gprs_add_context(gprs, gc); -- cgit v1.2.3