summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/ifx.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/plugins/ifx.c b/plugins/ifx.c
index ffb9f58f..eb30141b 100644
--- a/plugins/ifx.c
+++ b/plugins/ifx.c
@@ -667,6 +667,8 @@ static void ifx_pre_sim(struct ofono_modem *modem)
static void ifx_post_sim(struct ofono_modem *modem)
{
struct ifx_data *data = ofono_modem_get_data(modem);
+ struct ofono_gprs *gprs;
+ struct ofono_gprs_context *gc;
DBG("%p", modem);
@@ -678,14 +680,34 @@ static void ifx_post_sim(struct ofono_modem *modem)
ofono_sms_create(modem, OFONO_VENDOR_IFX,
"atmodem", data->dlcs[AUX_DLC]);
+
+ gprs = ofono_gprs_create(modem, OFONO_VENDOR_IFX,
+ "atmodem", data->dlcs[NETREG_DLC]);
+ if (gprs == NULL)
+ return;
+
+ if (data->mux_ldisc < 0) {
+ gc = ofono_gprs_context_create(modem, 0,
+ "ifxmodem", data->dlcs[GPRS1_DLC]);
+ 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);
+
+ gc = ofono_gprs_context_create(modem, 0,
+ "ifxmodem", data->dlcs[GPRS3_DLC]);
+ if (gc)
+ ofono_gprs_add_context(gprs, gc);
+ }
}
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 *gc;
DBG("%p", modem);
@@ -705,28 +727,6 @@ static void ifx_post_online(struct ofono_modem *modem)
mw = ofono_message_waiting_create(modem);
if (mw)
ofono_message_waiting_register(mw);
-
- gprs = ofono_gprs_create(modem, OFONO_VENDOR_IFX,
- "atmodem", data->dlcs[NETREG_DLC]);
- if (gprs == NULL)
- return;
-
- if (data->mux_ldisc < 0) {
- gc = ofono_gprs_context_create(modem, 0,
- "ifxmodem", data->dlcs[GPRS1_DLC]);
- 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);
-
- gc = ofono_gprs_context_create(modem, 0,
- "ifxmodem", data->dlcs[GPRS3_DLC]);
- if (gc)
- ofono_gprs_add_context(gprs, gc);
- }
}
static struct ofono_modem_driver ifx_driver = {