huawei: Create sim atom for cdma modems

Don't create atom if sim is embedded.
Atom will use "atmodem-noef" drivers to support PIN management
and IMSI retrieval.
This commit is contained in:
Guillaume Zajac 2012-01-11 17:28:34 +01:00 committed by Denis Kenzior
parent 38056fdd50
commit b1eb2209ab
1 changed files with 12 additions and 0 deletions

View File

@ -758,6 +758,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);
}
}
}