From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 4/4] atmodem: packet switch bearer support
Date: Fri, 07 Jan 2011 10:27:38 -0600 [thread overview]
Message-ID: <4D273EFA.3020202@gmail.com> (raw)
In-Reply-To: <1294416127-22432-4-git-send-email-remi.denis-courmont@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 2677 bytes --]
Hi Rémi,
On 01/07/2011 10:02 AM, Rémi Denis-Courmont wrote:
> ---
> drivers/atmodem/gprs.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 50 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/atmodem/gprs.c b/drivers/atmodem/gprs.c
> index a38c6b4..1d4a8bf 100644
> --- a/drivers/atmodem/gprs.c
> +++ b/drivers/atmodem/gprs.c
> @@ -200,6 +200,54 @@ static void xdatastat_notify(GAtResult *result, gpointer user_data)
> }
> }
>
> +static void cpsb_notify(GAtResult *result, gpointer user_data)
> +{
> + struct ofono_gprs *gprs = user_data;
> + GAtResultIter iter;
> + gint cid, bearer;
> +
> + g_at_result_iter_init(&iter, result);
> + if (!g_at_result_iter_next(&iter, "+CPSB:"))
> + return;
doc/coding-style.txt Rule M1
> + if (!g_at_result_iter_next_number(&iter, &cid))
> + return;
doc/coding-style.txt Rule M1
> + if (!g_at_result_iter_next_number(&iter, &bearer))
> + return;
> +
> + ofono_gprs_bearer_notify(gprs, cid, bearer);
> +}
> +
> +static void cpsb_cb(gboolean ok, GAtResult *result, gpointer user_data)
> +{
> + struct ofono_gprs *gprs = user_data;
> + GAtResultIter iter;
> + gint cid, bearer;
> +
> + if (!ok)
> + return;
> +
> + g_at_result_iter_init(&iter, result);
> + if (!g_at_result_iter_next(&iter, "+CPSB:"))
> + return;
doc/coding-style.txt Rule M1
> +
> + g_at_result_iter_next_number(&iter, NULL);
> + while (g_at_result_iter_next_number(&iter, &cid) &&
> + g_at_result_iter_next_number(&iter, &bearer))
> + ofono_gprs_bearer_notify(gprs, cid, bearer);
doc/coding-style.txt Rule M1
> +}
> +
> +static void cpsb_set_cb(gboolean ok, GAtResult *result, gpointer user_data)
> +{
> + struct ofono_gprs *gprs = user_data;
> + struct gprs_data *gd = ofono_gprs_get_data(gprs);
> +
> + if (!ok)
> + return;
> +
> + g_at_chat_register(gd->chat, "+CPSB:", cpsb_notify, FALSE, gprs, NULL);
> + g_at_chat_send(gd->chat, "AT+CPSB?", none_prefix, cpsb_cb, gprs, NULL);
Why do you bother running CPSB query? No context is active at this point.
> +}
> +
> static void gprs_initialized(gboolean ok, GAtResult *result, gpointer user_data)
> {
> struct ofono_gprs *gprs = user_data;
> @@ -208,6 +256,8 @@ static void gprs_initialized(gboolean ok, GAtResult *result, gpointer user_data)
> g_at_chat_register(gd->chat, "+CGEV:", cgev_notify, FALSE, gprs, NULL);
> g_at_chat_register(gd->chat, "+CGREG:", cgreg_notify,
> FALSE, gprs, NULL);
> + g_at_chat_send(gd->chat, "AT+CPSB=1", none_prefix,
> + cpsb_set_cb, gprs, NULL);
>
> switch (gd->vendor) {
> case OFONO_VENDOR_IFX:
Regards,
-Denis
next prev parent reply other threads:[~2011-01-07 16:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 16:02 [PATCH 1/4] Define packet switched bearers =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-07 16:02 ` [PATCH 2/4] Core support for packet switched bearer reporting =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-07 16:25 ` Denis Kenzior
2011-01-10 11:19 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-10 16:16 ` Denis Kenzior
2011-01-10 11:33 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-10 16:19 ` Denis Kenzior
2011-01-07 16:02 ` [PATCH 3/4] Bearer documentation =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-07 16:23 ` Denis Kenzior
2011-01-10 11:21 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-10 16:27 ` Denis Kenzior
2011-01-10 16:34 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-11 0:26 ` Marcel Holtmann
2011-01-11 7:53 ` Aki Niemi
2011-01-12 16:40 ` Marcel Holtmann
2011-01-13 8:17 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-10 12:41 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-10 16:20 ` Denis Kenzior
2011-01-07 16:02 ` [PATCH 4/4] atmodem: packet switch bearer support =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-07 16:27 ` Denis Kenzior [this message]
2011-01-07 16:23 ` [PATCH 1/4] Define packet switched bearers Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D273EFA.3020202@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.