All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] telit: move gprs atom into post sim phase
@ 2012-08-16  8:40 Christopher Vogl
  2012-08-16  6:13 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher Vogl @ 2012-08-16  8:40 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1824 bytes --]

---
 plugins/telit.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/plugins/telit.c b/plugins/telit.c
index 6ae7249..519f2ac 100644
--- a/plugins/telit.c
+++ b/plugins/telit.c
@@ -559,6 +559,8 @@ static void telit_pre_sim(struct ofono_modem *modem)
 static void telit_post_sim(struct ofono_modem *modem)
 {
 	struct telit_data *data = ofono_modem_get_data(modem);
+	struct ofono_gprs *gprs;
+	struct ofono_gprs_context *gc;
 
 	if (data->sap_modem)
 		modem = data->sap_modem;
@@ -566,6 +568,12 @@ static void telit_post_sim(struct ofono_modem *modem)
 	DBG("%p", modem);
 
 	ofono_sms_create(modem, 0, "atmodem", data->chat);
+
+	gprs = ofono_gprs_create(modem, OFONO_VENDOR_TELIT, "atmodem", data->chat);
+	gc = ofono_gprs_context_create(modem, 0, "atmodem", data->chat);
+
+	if (gprs && gc)
+		ofono_gprs_add_context(gprs, gc);
 }
 
 static void set_online_cb(gboolean ok, GAtResult *result, gpointer user_data)
@@ -595,8 +603,6 @@ static void telit_post_online(struct ofono_modem *modem)
 {
 	struct telit_data *data = ofono_modem_get_data(modem);
 	struct ofono_message_waiting *mw;
-	struct ofono_gprs *gprs;
-	struct ofono_gprs_context *gc;
 
 	if(data->sap_modem)
 		modem = data->sap_modem;
@@ -610,12 +616,6 @@ static void telit_post_online(struct ofono_modem *modem)
 	ofono_call_meter_create(modem, 0, "atmodem", data->chat);
 	ofono_call_barring_create(modem, 0, "atmodem", data->chat);
 
-	gprs = ofono_gprs_create(modem, 0, "atmodem", data->chat);
-	gc = ofono_gprs_context_create(modem, 0, "atmodem", data->chat);
-
-	if (gprs && gc)
-		ofono_gprs_add_context(gprs, gc);
-
 	mw = ofono_message_waiting_create(modem);
 	if (mw)
 		ofono_message_waiting_register(mw);
-- 
1.7.7.6


--
Scanned by MailScanner.


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-16  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-16  8:40 [PATCH] telit: move gprs atom into post sim phase Christopher Vogl
2012-08-16  6:13 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.