Open Source Telephony
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [RFC PATCH 1/4] sim: check if FD is enabled in the SIM-card
Date: Sat, 02 Oct 2010 08:22:38 +0200	[thread overview]
Message-ID: <1286000558.4231.35.camel@aeonflux> (raw)
In-Reply-To: <1285949201-2994-2-git-send-email-petteri.tikander@ixonos.com>

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

Hi Petteri Tikander,

> ---
>  drivers/atmodem/sim.c |   23 +++++++++++++++++++++
>  include/sim.h         |    3 ++
>  src/sim.c             |   52 +++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 78 insertions(+), 0 deletions(-)

these need to be split into two separate patches no matter what. First
one is adding a feature to the core. The other is implementing it in the
atom driver.

> diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
> index d0a7148..854ba08 100644
> --- a/drivers/atmodem/sim.c
> +++ b/drivers/atmodem/sim.c
> @@ -831,6 +831,28 @@ error:
>  	CALLBACK_WITH_FAILURE(cb, -1, data);
>  }
>  
> +static void at_barring_query_enabled(struct ofono_sim *sim,
> +				ofono_sim_locked_cb_t cb, void *data)
> +{
> +	struct sim_data *sd = ofono_sim_get_data(sim);
> +	struct cb_data *cbd = cb_data_new(cb, data);
> +	char buf[64];
> +
> +	if (!cbd)
> +		goto error;
> +
> +	snprintf(buf, sizeof(buf), "AT+CLCK=\"FD\",2");
> +
> +	if (g_at_chat_send(sd->chat, buf, clck_prefix,
> +				at_lock_status_cb, cbd, g_free) > 0)
> +		return;
> +
> +error:
> +	g_free(cbd);
> +
> +	CALLBACK_WITH_FAILURE(cb, -1, data);
> +}
> +
>  static gboolean at_sim_register(gpointer user)
>  {
>  	struct ofono_sim *sim = user;
> @@ -898,6 +920,7 @@ static struct ofono_sim_driver driver = {
>  	.lock			= at_pin_enable,
>  	.change_passwd		= at_change_passwd,
>  	.query_locked		= at_pin_query_enabled,
> +	.query_call_barred	= at_barring_query_enabled,
>  };
>  
>  void at_sim_init()
> diff --git a/include/sim.h b/include/sim.h
> index 42b19bd..e73a995 100644
> --- a/include/sim.h
> +++ b/include/sim.h
> @@ -74,6 +74,7 @@ enum ofono_sim_cphs_phase {
>  enum ofono_sim_state {
>  	OFONO_SIM_STATE_NOT_PRESENT,
>  	OFONO_SIM_STATE_INSERTED,
> +	OFONO_SIM_STATE_FAILED,
>  	OFONO_SIM_STATE_READY,
>  };

I know that you guys talked with Denis about this, so I might be just
missing something here.

The requirement for minimum FDN support is really to power down the
modem and not leave it in pre_sim state for emergency calls?

Regards

Marcel



  parent reply	other threads:[~2010-10-02  6:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-01 16:06 Fixed Dialing Petteri Tikander
2010-10-01 16:06 ` [RFC PATCH 1/4] sim: check if FD is enabled in the SIM-card Petteri Tikander
2010-10-01 16:06   ` [RFC PATCH 2/4] modem: Remove atoms " Petteri Tikander
2010-10-01 16:06     ` [RFC PATCH 3/4] modem: some debugs added for indicating modem state change Petteri Tikander
2010-10-01 16:06       ` [RFC PATCH 4/4] TODO: Owner of Fixed Dialing task Petteri Tikander
2010-10-02  6:11         ` Marcel Holtmann
2010-10-02  6:09       ` [RFC PATCH 3/4] modem: some debugs added for indicating modem state change Marcel Holtmann
2010-10-01 16:25   ` [RFC PATCH 1/4] sim: check if FD is enabled in the SIM-card Jeevaka.Badrappan
2010-10-04 12:19     ` Petteri Tikander
2010-10-02  6:22   ` Marcel Holtmann [this message]
2010-10-04 16:17     ` Petteri Tikander
2010-10-05  0:03       ` Denis Kenzior
2010-10-04 13:31   ` Pekka Pessi

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=1286000558.4231.35.camel@aeonflux \
    --to=marcel@holtmann.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox