diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-12-18 23:38:42 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-01-08 18:40:47 +0100 |
commit | 1372933345b197d89a7e4ae0d5bdcec1fd1e1b2e (patch) | |
tree | 908c7103dcf66afcb9090900ada612a6fc66c851 /src/mm-sim-qmi.c | |
parent | 959bb9d2ffb8bd7a3d701c21ec2cb58cab3717d9 (diff) |
iface-modem,sim: improve lock info update logic
The logic to handle the lock information (current lock and unlock retry count)
wasn't handling all possible cases properly, e.g.:
* When PIN is incorrectly entered too many times, a SIM-PUK error may happen.
In this case we need to directly assume SIM-PUK is the current lock (some
modems, like Option HSO ones, would incorrectly reply SIM-PIN if CPIN? asked
just after the SIM-PUK error).
* After every operation acting in SIM locks, we need to update the current
unlock retry count.
This change tries to cover those cases, by:
* The logic to check current lock is extended to also load the unlock retry
count when needed.
* Whenever a SIM-PUK error happens in the SIM operations, we directly assume
that SIM-PUK is required, without re-asking CPIN?.
* The overall logic of lock checking is now handled by a state machine, which
is much easier to understand.
Diffstat (limited to 'src/mm-sim-qmi.c')
0 files changed, 0 insertions, 0 deletions