From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 1/4] Define packet switched bearers
Date: Fri, 07 Jan 2011 10:23:34 -0600 [thread overview]
Message-ID: <4D273E06.1000302@gmail.com> (raw)
In-Reply-To: <1294416127-22432-1-git-send-email-remi.denis-courmont@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 1848 bytes --]
Hi Rémi,
On 01/07/2011 10:02 AM, Rémi Denis-Courmont wrote:
> ---
> src/common.c | 14 ++++++++++++++
> src/common.h | 13 +++++++++++++
> 2 files changed, 27 insertions(+), 0 deletions(-)
>
> diff --git a/src/common.c b/src/common.c
> index d4e567b..6664007 100644
> --- a/src/common.c
> +++ b/src/common.c
> @@ -714,6 +714,20 @@ const char *registration_tech_to_string(int tech)
> }
> }
>
> +const char *packet_bearer_to_string(int bearer)
> +{
> + static const char list[][6] = {
> + "none",
> + "gsm", "edge",
> + "umts", "hsupa", "hsdpa", "hspa",
> + "lte",
> + };
> +
> + if (((unsigned)bearer) < sizeof (list) / sizeof (list[0]))
> + return list[bearer];
> + return "unknown";
doc/coding-style.txt rule M1
Also, please drop the unknown bit and return ""
> +}
> +
> gboolean is_valid_apn(const char *apn)
> {
> int i;
> diff --git a/src/common.h b/src/common.h
> index 64f297e..d11cd8e 100644
> --- a/src/common.h
> +++ b/src/common.h
> @@ -87,6 +87,18 @@ enum bearer_class {
> BEARER_CLASS_PAD = 128
> };
>
> +/* 27.007 Section 7.29 */
> +enum packet_bearer {
> + PACKET_BEARER_NONE = 0,
> + PACKET_BEARER_GPRS = 1,
> + PACKET_BEARER_EDGE = 2,
> + PACKET_BEARER_UMTS = 3,
> + PACKET_BEARER_HSUPA = 4,
> + PACKET_BEARER_HSDPA = 5,
> + PACKET_BEARER_HSUPA_HSDPA = 6,
> + PACKET_BEARER_LTE = 7,
> +};
> +
doc/coding-style.txt rule M11
> /* 22.030 Section 6.5.2 */
> enum ss_control_type {
> SS_CONTROL_TYPE_ACTIVATION,
> @@ -158,5 +170,6 @@ gboolean is_valid_pin(const char *pin, enum pin_type type);
>
> const char *registration_status_to_string(int status);
> const char *registration_tech_to_string(int tech);
> +const char *packet_bearer_to_string(int bearer);
>
> gboolean is_valid_apn(const char *apn);
Regards,
-Denis
prev parent reply other threads:[~2011-01-07 16:23 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
2011-01-07 16:23 ` Denis Kenzior [this message]
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=4D273E06.1000302@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.