mirror of git://git.sysmocom.de/ofono
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.
This commit is contained in:
parent
74c23d3302
commit
305514ced9
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue