All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH_v2 0/2] Create sim atom for CDMA modems
  2012-01-11 16:28 [PATCH_v2 0/2] Create sim atom for CDMA modems Guillaume Zajac
@ 2012-01-11 12:50 ` Denis Kenzior
  2012-01-11 16:28 ` [PATCH_v2 1/2] atmodem: Create new sim driver without EF entries Guillaume Zajac
  2012-01-11 16:28 ` [PATCH_v2 2/2] huawei: Create sim atom for cdma modems Guillaume Zajac
  2 siblings, 0 replies; 4+ messages in thread
From: Denis Kenzior @ 2012-01-11 12:50 UTC (permalink / raw)
  To: ofono

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

Hi Guillaume,

On 01/11/2012 10:28 AM, Guillaume Zajac wrote:
> Hi,
> 
> This new version contains patches from updated tree.
> 
> Kind regards,
> Guillaume
> 
> Guillaume Zajac (2):
>   atmodem: Create new sim driver without EF entries
>   huawei: Create sim atom for cdma modems
> 
>  drivers/atmodem/sim.c |   16 ++++++++++++++++
>  plugins/huawei.c      |   12 ++++++++++++
>  2 files changed, 28 insertions(+), 0 deletions(-)
> 

Both patches have been applied, however I refactored the second one
slightly in a follow-on commit.  Please make sure I didn't screw
anything up.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH_v2 0/2] Create sim atom for CDMA modems
@ 2012-01-11 16:28 Guillaume Zajac
  2012-01-11 12:50 ` Denis Kenzior
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Guillaume Zajac @ 2012-01-11 16:28 UTC (permalink / raw)
  To: ofono

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

Hi,

This new version contains patches from updated tree.

Kind regards,
Guillaume

Guillaume Zajac (2):
  atmodem: Create new sim driver without EF entries
  huawei: Create sim atom for cdma modems

 drivers/atmodem/sim.c |   16 ++++++++++++++++
 plugins/huawei.c      |   12 ++++++++++++
 2 files changed, 28 insertions(+), 0 deletions(-)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH_v2 1/2] atmodem: Create new sim driver without EF entries
  2012-01-11 16:28 [PATCH_v2 0/2] Create sim atom for CDMA modems Guillaume Zajac
  2012-01-11 12:50 ` Denis Kenzior
@ 2012-01-11 16:28 ` Guillaume Zajac
  2012-01-11 16:28 ` [PATCH_v2 2/2] huawei: Create sim atom for cdma modems Guillaume Zajac
  2 siblings, 0 replies; 4+ messages in thread
From: Guillaume Zajac @ 2012-01-11 16:28 UTC (permalink / raw)
  To: ofono

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

This driver will be used by CDMA modems to support PIN
management and IMSI retreival.
EF entries for CDMA modems cannot be implemented without
manufacturers specifications.
---
 drivers/atmodem/sim.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
index 297914d..8edd582 100644
--- a/drivers/atmodem/sim.c
+++ b/drivers/atmodem/sim.c
@@ -1269,12 +1269,28 @@ static struct ofono_sim_driver driver = {
 	.query_locked		= at_pin_query_enabled,
 };
 
+static struct ofono_sim_driver driver_noef = {
+	.name			= "atmodem-noef",
+	.probe			= at_sim_probe,
+	.remove			= at_sim_remove,
+	.read_imsi		= at_read_imsi,
+	.query_passwd_state	= at_pin_query,
+	.query_pin_retries	= at_pin_retries_query,
+	.send_passwd		= at_pin_send,
+	.reset_passwd		= at_pin_send_puk,
+	.lock			= at_pin_enable,
+	.change_passwd		= at_change_passwd,
+	.query_locked		= at_pin_query_enabled,
+};
+
 void at_sim_init(void)
 {
 	ofono_sim_driver_register(&driver);
+	ofono_sim_driver_register(&driver_noef);
 }
 
 void at_sim_exit(void)
 {
 	ofono_sim_driver_unregister(&driver);
+	ofono_sim_driver_unregister(&driver_noef);
 }
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH_v2 2/2] huawei: Create sim atom for cdma modems
  2012-01-11 16:28 [PATCH_v2 0/2] Create sim atom for CDMA modems Guillaume Zajac
  2012-01-11 12:50 ` Denis Kenzior
  2012-01-11 16:28 ` [PATCH_v2 1/2] atmodem: Create new sim driver without EF entries Guillaume Zajac
@ 2012-01-11 16:28 ` Guillaume Zajac
  2 siblings, 0 replies; 4+ messages in thread
From: Guillaume Zajac @ 2012-01-11 16:28 UTC (permalink / raw)
  To: ofono

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

Don't create atom if sim is embedded.
Atom will use "atmodem-noef" drivers to support PIN management
and IMSI retrieval.
---
 plugins/huawei.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/plugins/huawei.c b/plugins/huawei.c
index 5030e00..bcec467 100644
--- a/plugins/huawei.c
+++ b/plugins/huawei.c
@@ -748,6 +748,18 @@ static void huawei_pre_sim(struct ofono_modem *modem)
 			ofono_sim_inserted_notify(sim, TRUE);
 	} else if (data->have_cdma == TRUE) {
 		ofono_devinfo_create(modem, 0, "cdmamodem", data->pcui);
+
+		/* Create SIM atom only if SIM is not embedded */
+		if (data->sim_state != SIM_STATE_ROMSIM) {
+			struct ofono_sim *sim;
+
+			/* Use sim drivers without Elementary File entries */
+			sim = ofono_sim_create(modem, OFONO_VENDOR_HUAWEI,
+						"atmodem-noef", data->pcui);
+
+			if (sim && data->have_sim == TRUE)
+				ofono_sim_inserted_notify(sim, TRUE);
+		}
 	}
 }
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-11 16:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-11 16:28 [PATCH_v2 0/2] Create sim atom for CDMA modems Guillaume Zajac
2012-01-11 12:50 ` Denis Kenzior
2012-01-11 16:28 ` [PATCH_v2 1/2] atmodem: Create new sim driver without EF entries Guillaume Zajac
2012-01-11 16:28 ` [PATCH_v2 2/2] huawei: Create sim atom for cdma modems Guillaume Zajac

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.