diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-09-10 17:44:36 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-09-10 17:44:36 -0500 |
commit | 2bdf1f50a1cfd94ed70c109b8277940906d90aa2 (patch) | |
tree | 4a5cecc593223340e7038fb4020131fcf5c2cbcf /drivers | |
parent | 40ef883fe4d1b27b46b5db2b36ce894d16a6d1d4 (diff) | |
download | ofono-2bdf1f50a1cfd94ed70c109b8277940906d90aa2.tar.bz2 |
Ensure CBS is in a known state at startup
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atmodem/cbs.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/atmodem/cbs.c b/drivers/atmodem/cbs.c index 3d3b6621..7dc14c48 100644 --- a/drivers/atmodem/cbs.c +++ b/drivers/atmodem/cbs.c @@ -147,7 +147,7 @@ error: } } -static gboolean at_cbs_register(gpointer user) +static void at_cbs_register(gboolean ok, GAtResult *result, gpointer user) { struct ofono_cbs *cbs = user; GAtChat *chat = ofono_cbs_get_data(cbs); @@ -163,8 +163,6 @@ static gboolean at_cbs_register(gpointer user) g_at_chat_register(chat, "+CBM:", at_cbm_notify, TRUE, cbs, NULL); ofono_cbs_register(cbs); - - return FALSE; } static int at_cbs_probe(struct ofono_cbs *cbs, unsigned int vendor, @@ -173,7 +171,12 @@ static int at_cbs_probe(struct ofono_cbs *cbs, unsigned int vendor, GAtChat *chat = data; ofono_cbs_set_data(cbs, chat); - g_idle_add(at_cbs_register, cbs); + + /* Start with CBS not accepting any channels. The core will + * power on / set preferred channels when it is ready + */ + g_at_chat_send(chat, "AT+CSCB=1,\"0-65535\"", none_prefix, + at_cbs_register, cbs, NULL); return 0; } |