diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-10-26 17:05:23 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-10-26 17:05:23 +0200 |
commit | 305514ced97ae5144d4cac1e848ba661e2ec4a31 (patch) | |
tree | db26078e826861eb4ef9c9824d2401bfb87adbf4 /plugins/ifx.c | |
parent | 74c23d3302abe2eaaf6da1bcc70521ecf8814e8b (diff) | |
download | ofono-305514ced97ae5144d4cac1e848ba661e2ec4a31.tar.bz2 |
ifx: Add support for having three active GPRS contexts
The Infineon modem can at least support three active GPRS contexts in
M-RAW_IP mode. So use another DLC for the third context.
Diffstat (limited to 'plugins/ifx.c')
-rw-r--r-- | plugins/ifx.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/plugins/ifx.c b/plugins/ifx.c index c28b730f..0d46c032 100644 --- a/plugins/ifx.c +++ b/plugins/ifx.c @@ -62,19 +62,21 @@ #include <drivers/atmodem/atutil.h> #include <drivers/atmodem/vendor.h> -#define NUM_DLC 5 +#define NUM_DLC 6 #define VOICE_DLC 0 #define NETREG_DLC 1 #define GPRS1_DLC 2 #define GPRS2_DLC 3 -#define AUX_DLC 4 +#define GPRS3_DLC 4 +#define AUX_DLC 5 -static char *dlc_prefixes[NUM_DLC] = { "Voice: ", "Net: ", - "GPRS1: ", "GPRS2: ", "Aux: " }; +static char *dlc_prefixes[NUM_DLC] = { "Voice: ", "Net: ", "GPRS1: ", + "GPRS2: ", "GPRS3: ", "Aux: " }; static const char *dlc_nodes[NUM_DLC] = { "/dev/ttyGSM1", "/dev/ttyGSM2", - "/dev/ttyGSM3", "/dev/ttyGSM4", "/dev/ttyGSM6" }; + "/dev/ttyGSM3", "/dev/ttyGSM4", + "/dev/ttyGSM5", "/dev/ttyGSM6" }; static const char *none_prefix[] = { NULL }; static const char *xdrv_prefix[] = { "+XDRV:", NULL }; @@ -373,6 +375,7 @@ static gboolean dlc_setup(gpointer user_data) g_at_chat_set_slave(data->dlcs[GPRS1_DLC], data->dlcs[NETREG_DLC]); g_at_chat_set_slave(data->dlcs[GPRS2_DLC], data->dlcs[NETREG_DLC]); + g_at_chat_set_slave(data->dlcs[GPRS3_DLC], data->dlcs[NETREG_DLC]); g_at_chat_send(data->dlcs[AUX_DLC], "AT+CFUN=4", NULL, cfun_enable, modem, NULL); @@ -745,6 +748,11 @@ static void ifx_post_online(struct ofono_modem *modem) "ifxmodem", data->dlcs[GPRS2_DLC]); if (gc) ofono_gprs_add_context(gprs, gc); + + gc = ofono_gprs_context_create(modem, 0, + "ifxmodem", data->dlcs[GPRS3_DLC]); + if (gc) + ofono_gprs_add_context(gprs, gc); } } |