diff options
author | Rukun Mao <rmao@google.com> | 2023-08-31 20:04:32 +0000 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2023-10-18 21:18:50 +0000 |
commit | 7b878765c6c8025ca7a4594af798a3d892e5bc58 (patch) | |
tree | ac7b7918795180642562a3835494a73cf1510b14 /src | |
parent | 9db7b18f4d04f1d7dca573424c1d4db848e4d5ce (diff) |
broadband-modem-mbim: reprobe modem and update SIM info after "nonInitialized" error
When the subscriber ready status notification's ready state becomes "initialized"
from "nonInitialized", it indicates a new SIM is inserted, for which a modem
reprobe is needed.
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-broadband-modem-mbim.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c index f8bb4fa0..63821c9c 100644 --- a/src/mm-broadband-modem-mbim.c +++ b/src/mm-broadband-modem-mbim.c @@ -5152,6 +5152,11 @@ basic_connect_notification_subscriber_ready_status (MMBroadbandModemMbim *self, if ((self->priv->enabled_cache.last_ready_state != MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED && ready_state == MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED) || (self->priv->enabled_cache.last_ready_state == MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED && + ready_state != MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED) || + /*SIM state becomes "not initialized" when queried shortly after being inserted. Its state + * transitions are: "not inserted" --> "not initialized" --> "initialized". To detect SIM + * hotswap event from this sequence, we need the check condition below*/ + (self->priv->enabled_cache.last_ready_state == MBIM_SUBSCRIBER_READY_STATE_NOT_INITIALIZED && ready_state != MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED)) { /* SIM has been removed or reinserted, re-probe to ensure correct interfaces are exposed */ mm_obj_dbg (self, "SIM hot swap detected"); |