diff options
author | Michal Mazur <mkm@semihalf.com> | 2021-12-15 16:07:36 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2022-01-30 13:48:48 +0000 |
commit | 5d4957935ba17c7c24ae92b82fc3fb90851f3235 (patch) | |
tree | e7ec4d9a9b900b9e9a3611dc4ee0c90642e053af /src/mm-broadband-modem-mbim.h | |
parent | ee87a6853228e0b4b5e6c132f0c90e8d094af441 (diff) |
sim-mbim,broadband-modem-mbim: store number of remaining attempts
On MBIM modems the type of PIN cannot be specified in MBIM_CID_PIN query
command and the modem responds only remaining attempts for the currently
active lock.
If PIN1 is unlocked and user tries to disable (or enable) it, MM won't
get an update of remaining attempts in response to PIN Query. This value
is returned only after the Set command and MM need to store it in
all (pin/puk)_set_(enter/enable/change)_ready functions.
Previous solution was to call the mm_iface_modem_update_unlock_retries
directly from these functions but it caused the notification to be send
too early and invalid number was displayed to user sometimes.
Instead of this MM will store numbers of remaining attempts and send
them in a single notification from modem_load_unlock_retries.
Diffstat (limited to 'src/mm-broadband-modem-mbim.h')
-rw-r--r-- | src/mm-broadband-modem-mbim.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mm-broadband-modem-mbim.h b/src/mm-broadband-modem-mbim.h index 529b3374..9e92390d 100644 --- a/src/mm-broadband-modem-mbim.h +++ b/src/mm-broadband-modem-mbim.h @@ -62,4 +62,8 @@ MMPortMbim *mm_broadband_modem_mbim_get_port_mbim (MMBroadbandModemMbi MMPortMbim *mm_broadband_modem_mbim_get_port_mbim_for_data (MMBroadbandModemMbim *self, MMPort *data, GError **error); + +void mm_broadband_modem_mbim_set_unlock_retries (MMBroadbandModemMbim *self, + MMModemLock lock_type, + guint32 remaining_attempts); #endif /* MM_BROADBAND_MODEM_MBIM_H */ |