diff options
author | Denis Kenzior <denkenz@gmail.com> | 2012-11-24 07:50:44 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-11-28 10:31:14 -0600 |
commit | e9d15ae89959647c2bf1f28ab1725ce8e6e45a82 (patch) | |
tree | f01ad396e11ffc55a6f83375c987de1505540ae1 /plugins/ifx.c | |
parent | b26f7c73d30617e81b09dc4f0161b84e2ba401b3 (diff) | |
download | ofono-e9d15ae89959647c2bf1f28ab1725ce8e6e45a82.tar.bz2 |
ifx: Rework SIM state handling
When performing a SIM REFRESH, particularly NAA Initialization, we need
to wait until the modem sends XSIMSTATE: 7, not XSIMSTATE:2. Even on
normal initialization it seems safer to wait until XSIMSTATE:2.
Diffstat (limited to 'plugins/ifx.c')
-rw-r--r-- | plugins/ifx.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/ifx.c b/plugins/ifx.c index eb30141b..6936fd10 100644 --- a/plugins/ifx.c +++ b/plugins/ifx.c @@ -139,19 +139,24 @@ static void ifx_set_sim_state(struct ifx_data *data, int state) switch (state) { case 0: /* SIM not present */ + case 6: /* SIM Error */ + case 8: /* SIM Technical Problem */ case 9: /* SIM Removed */ ofono_sim_inserted_notify(data->sim, FALSE); break; case 1: /* PIN verification needed */ - case 2: /* PIN verification not needed – Ready */ - case 3: /* PIN verified – Ready */ case 4: /* PUK verification needed */ case 5: /* SIM permanently blocked */ - case 6: /* SIM Error */ case 7: /* ready for attach (+COPS) */ - case 8: /* SIM Technical Problem */ ofono_sim_inserted_notify(data->sim, TRUE); break; + case 2: /* PIN verification not needed – Ready */ + case 3: /* PIN verified – Ready */ + /* + * State 3 is handled in the SIM atom driver + * while for state 2 we should be waiting for state 7 + */ + break; case 10: /* SIM Reactivating */ case 11: /* SIM Reactivated */ case 12: /* SIM SMS Caching Completed */ |