mirror of git://git.sysmocom.de/ofono
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.
This commit is contained in:
parent
b26f7c73d3
commit
e9d15ae899
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue