* [PATCH] plugins/ril: Move GPRS atom creating to 'post_online' state
@ 2016-04-21 8:15 caiwen.zhang
2016-04-22 19:20 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: caiwen.zhang @ 2016-04-21 8:15 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2659 bytes --]
From: Caiwen Zhang <caiwen.zhang@intel.com>
At gprs atom 'probe' state, max cid query may fail due to rild
status isn't RADIO_STATUS_ON. It causes gprs atom is removed, gprs
feature is inavailable. Move gprs atom creating to 'post_online'
state to make sure rild status is RADIO_STATUS_ON when query max
cid.
---
plugins/ril.c | 36 +++++++++++++++++-------------------
1 file changed, 17 insertions(+), 19 deletions(-)
diff --git a/plugins/ril.c b/plugins/ril.c
index ea50d76..b66664a 100644
--- a/plugins/ril.c
+++ b/plugins/ril.c
@@ -215,8 +215,6 @@ void ril_pre_sim(struct ofono_modem *modem)
void ril_post_sim(struct ofono_modem *modem)
{
struct ril_data *rd = ofono_modem_get_data(modem);
- struct ofono_gprs *gprs;
- struct ofono_gprs_context *gc;
struct ofono_message_waiting *mw;
/* TODO: this function should setup:
@@ -226,23 +224,6 @@ void ril_post_sim(struct ofono_modem *modem)
*/
ofono_sms_create(modem, rd->vendor, RILMODEM, rd->ril);
- gprs = ofono_gprs_create(modem, rd->vendor, RILMODEM, rd->ril);
- gc = ofono_gprs_context_create(modem, rd->vendor, RILMODEM, rd->ril);
-
- if (gc) {
- ofono_gprs_context_set_type(gc,
- OFONO_GPRS_CONTEXT_TYPE_INTERNET);
- ofono_gprs_add_context(gprs, gc);
- }
-
- gc = ofono_gprs_context_create(modem, rd->vendor, RILMODEM, rd->ril);
-
- if (gc) {
- ofono_gprs_context_set_type(gc,
- OFONO_GPRS_CONTEXT_TYPE_MMS);
- ofono_gprs_add_context(gprs, gc);
- }
-
mw = ofono_message_waiting_create(modem);
if (mw)
ofono_message_waiting_register(mw);
@@ -255,11 +236,28 @@ void ril_post_sim(struct ofono_modem *modem)
void ril_post_online(struct ofono_modem *modem)
{
struct ril_data *rd = ofono_modem_get_data(modem);
+ struct ofono_gprs *gprs;
+ struct ofono_gprs_context *gc;
ofono_netreg_create(modem, rd->vendor, RILMODEM, rd->ril);
ofono_ussd_create(modem, rd->vendor, RILMODEM, rd->ril);
ofono_call_settings_create(modem, rd->vendor, RILMODEM, rd->ril);
ofono_call_barring_create(modem, rd->vendor, RILMODEM, rd->ril);
+ gprs = ofono_gprs_create(modem, rd->vendor, RILMODEM, rd->ril);
+ gc = ofono_gprs_context_create(modem, rd->vendor, RILMODEM, rd->ril);
+
+ if (gc) {
+ ofono_gprs_context_set_type(gc,
+ OFONO_GPRS_CONTEXT_TYPE_INTERNET);
+ ofono_gprs_add_context(gprs, gc);
+ }
+
+ gc = ofono_gprs_context_create(modem, rd->vendor, RILMODEM, rd->ril);
+
+ if (gc) {
+ ofono_gprs_context_set_type(gc, OFONO_GPRS_CONTEXT_TYPE_MMS);
+ ofono_gprs_add_context(gprs, gc);
+ }
}
static void ril_set_online_cb(struct ril_msg *message, gpointer user_data)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] plugins/ril: Move GPRS atom creating to 'post_online' state
2016-04-21 8:15 [PATCH] plugins/ril: Move GPRS atom creating to 'post_online' state caiwen.zhang
@ 2016-04-22 19:20 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2016-04-22 19:20 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 569 bytes --]
Hi Caiwen,
On 04/21/2016 03:15 AM, caiwen.zhang(a)intel.com wrote:
> From: Caiwen Zhang <caiwen.zhang@intel.com>
>
> At gprs atom 'probe' state, max cid query may fail due to rild
> status isn't RADIO_STATUS_ON. It causes gprs atom is removed, gprs
> feature is inavailable. Move gprs atom creating to 'post_online'
> state to make sure rild status is RADIO_STATUS_ON when query max
> cid.
> ---
> plugins/ril.c | 36 +++++++++++++++++-------------------
> 1 file changed, 17 insertions(+), 19 deletions(-)
>
Applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-22 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-21 8:15 [PATCH] plugins/ril: Move GPRS atom creating to 'post_online' state caiwen.zhang
2016-04-22 19:20 ` 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.