summaryrefslogtreecommitdiffstats
path: root/plugins/huawei.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2011-07-25 01:34:41 +0200
committerMarcel Holtmann <marcel@holtmann.org>2011-07-25 01:34:41 +0200
commite0f1249fcc10bb8dab8971471d7815f155113afe (patch)
tree5b9a3c20dd669a30d250b4af740ff7931a8ca5b1 /plugins/huawei.c
parent626612a8bf47a4d19a5520832b966c8f658160ad (diff)
downloadofono-e0f1249fcc10bb8dab8971471d7815f155113afe.tar.bz2
huawei: Remove broken handling for NDIS support
Diffstat (limited to 'plugins/huawei.c')
-rw-r--r--plugins/huawei.c37
1 files changed, 11 insertions, 26 deletions
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);