diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-10-26 17:00:52 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-10-26 17:00:52 +0200 |
commit | 74c23d3302abe2eaaf6da1bcc70521ecf8814e8b (patch) | |
tree | 1a7617eb89fbfbf69dd3928792c3e9f9f471d80d /plugins/ifx.c | |
parent | 8c0163bfc07a89e96d7d0d75edb429c86cf59c41 (diff) | |
download | ofono-74c23d3302abe2eaaf6da1bcc70521ecf8814e8b.tar.bz2 |
ifx: Use M-RAW_IP support only with internal multiplexer
The GPRS context can only be fully supported with the internal multiplexer
right now. So use M-RAW_IP support in that case. If using a kernel based
multiplexer, then no GPRS context is provided.
Diffstat (limited to 'plugins/ifx.c')
-rw-r--r-- | plugins/ifx.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/plugins/ifx.c b/plugins/ifx.c index 9c3c3e3d..c28b730f 100644 --- a/plugins/ifx.c +++ b/plugins/ifx.c @@ -707,7 +707,7 @@ static void ifx_post_online(struct ofono_modem *modem) struct ifx_data *data = ofono_modem_get_data(modem); struct ofono_message_waiting *mw; struct ofono_gprs *gprs; - struct ofono_gprs_context *gc1, *gc2; + struct ofono_gprs_context *gc; DBG("%p", modem); @@ -736,21 +736,16 @@ static void ifx_post_online(struct ofono_modem *modem) return; if (data->mux_ldisc < 0) { - gc1 = ofono_gprs_context_create(modem, 0, - "atmodem", data->dlcs[GPRS1_DLC]); - gc2 = ofono_gprs_context_create(modem, 0, - "atmodem", data->dlcs[GPRS2_DLC]); - } else { - gc1 = ofono_gprs_context_create(modem, 0, + gc = ofono_gprs_context_create(modem, 0, "ifxmodem", data->dlcs[GPRS1_DLC]); - gc2 = ofono_gprs_context_create(modem, 0, + if (gc) + ofono_gprs_add_context(gprs, gc); + + gc = ofono_gprs_context_create(modem, 0, "ifxmodem", data->dlcs[GPRS2_DLC]); + if (gc) + ofono_gprs_add_context(gprs, gc); } - - if (gc1) - ofono_gprs_add_context(gprs, gc1); - if (gc2) - ofono_gprs_add_context(gprs, gc2); } static struct ofono_modem_driver ifx_driver = { |