* [PATCH 1/2] atmodem: Create new sim driver without EF entries
2012-01-11 16:23 [PATCH 0/2] Create sim atom for CDMA modems Guillaume Zajac
@ 2012-01-11 16:23 ` Guillaume Zajac
2012-01-11 16:23 ` [PATCH 2/2] huawei: Create sim atom for cdma modems Guillaume Zajac
2012-01-11 16:25 ` [PATCH 0/2] Create sim atom for CDMA modems Guillaume Zajac
2 siblings, 0 replies; 4+ messages in thread
From: Guillaume Zajac @ 2012-01-11 16:23 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 2/2] huawei: Create sim atom for cdma modems
2012-01-11 16:23 [PATCH 0/2] Create sim atom for CDMA modems Guillaume Zajac
2012-01-11 16:23 ` [PATCH 1/2] atmodem: Create new sim driver without EF entries Guillaume Zajac
@ 2012-01-11 16:23 ` Guillaume Zajac
2012-01-11 16:25 ` [PATCH 0/2] Create sim atom for CDMA modems Guillaume Zajac
2 siblings, 0 replies; 4+ messages in thread
From: Guillaume Zajac @ 2012-01-11 16:23 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 77f4eba..11a7baa 100644
--- a/plugins/huawei.c
+++ b/plugins/huawei.c
@@ -709,6 +709,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* Re: [PATCH 0/2] Create sim atom for CDMA modems
2012-01-11 16:23 [PATCH 0/2] Create sim atom for CDMA modems Guillaume Zajac
2012-01-11 16:23 ` [PATCH 1/2] atmodem: Create new sim driver without EF entries Guillaume Zajac
2012-01-11 16:23 ` [PATCH 2/2] huawei: Create sim atom for cdma modems Guillaume Zajac
@ 2012-01-11 16:25 ` Guillaume Zajac
2 siblings, 0 replies; 4+ messages in thread
From: Guillaume Zajac @ 2012-01-11 16:25 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 702 bytes --]
Hi Denis
On 11/01/2012 17:23, Guillaume Zajac wrote:
> Hi,
>
> First patch creates a new sim driver without elementary file entries named "atmodem-noef"
> Second patch creates a sim atom for CDMA modem that uses this drivers in case sim state is not embedded.
>
> 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(-)
>
I didn't update my tree before creating those patch. I will send a new
version.
Kind regards,
Guillaume
^ permalink raw reply [flat|nested] 4+ messages in thread