All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 1/1] Set MNC length to 2 if EFad doesn't specify it
Date: Wed, 31 Oct 2012 15:09:24 -0500	[thread overview]
Message-ID: <50918574.8060600@gmail.com> (raw)
In-Reply-To: <1347525847-2991-1-git-send-email-jonas@southpole.se>

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

Hi Jonas,

On 09/13/2012 03:44 AM, Jonas Bonn wrote:
> Byte 4 of the EFAD structure, which specifies the MNC length, is optional.
> If this byte is not present, then there is no way to determine the length
> of the MNC.  As the, by far, most common length is 2, we might as well
> default to this value.

Depends on the continent.  On some it is not common at all.

>
> This patch changes the ofono_error to a warning as it's not really an
> error that we're encountering, but the user should nonetheless be given
> a heads-up that something might not work as expected.

What spec are you reading? 31.102 says it is mandatory ;)

>
> Signed-off-by: Jonas Bonn<jonas@southpole.se>

We do not use Signed-off-by here.

> ---
>   src/sim.c |    4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/sim.c b/src/sim.c
> index 4384eb0..f6109c6 100644
> --- a/src/sim.c
> +++ b/src/sim.c
> @@ -1760,7 +1760,9 @@ static void sim_ad_read_cb(int ok, int length, int record,
>   		return;
>
>   	if (length<  4) {
> -		ofono_error("EFad should contain at least four bytes");
> +		ofono_warn("EFad does not specify (optional) MNC length"
> +			   ", defaulting to 2");
> +		sim->mnc_length = 2;

And I'd rather not do this.  If mnc_length is unable to be determined, 
then oFono does not guess, but simply does not provide this information. 
  This hack might work for really old 2G devices which did not 
understand length 3 MNCs and always assumed length 2, but that is not 
really oFono's target.

>   		return;
>   	}
>

Regards,
-Denis

      reply	other threads:[~2012-10-31 20:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-13  8:44 [PATCH 1/1] Set MNC length to 2 if EFad doesn't specify it Jonas Bonn
2012-10-31 20:09 ` 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=50918574.8060600@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.