diff options
author | Denis Kenzior <denkenz@gmail.com> | 2012-11-22 06:44:34 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-11-22 06:50:09 -0600 |
commit | 8b339a4754dfc0b7d48c7ca5c14644d7ca178d79 (patch) | |
tree | 7f8b80aaca5dea607fd618d686fc61d444982440 /plugins/ifx.c | |
parent | 792c9c02f8e258d4b53d93a8617762558f1ffd65 (diff) | |
download | ofono-8b339a4754dfc0b7d48c7ca5c14644d7ca178d79.tar.bz2 |
ifx: Move connman atom to post_sim state
Diffstat (limited to 'plugins/ifx.c')
-rw-r--r-- | plugins/ifx.c | 48 |
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 = { |