Draft: broadband-modem: send SYNC_NEEDED signal before enabling modem
It is not possible to connect after the PIN locked SIM card is hot swapped while MBIM modem is disabled or suspended. Following steps make it impossible to unlock SIM card after hot swap:
- Unlock SIM card with PIN (IMSI number cannot be read when SIM is locked and stays empty after unlocking)
- Disable modem or suspend the device
- Take out the SIM card (it will be PIN locked again)
- Insert the SIM card
- Enable modem or wake up the device
- Connection will fail because SIM card is locked and MM didn't update its state
In both cases hot swap will not be detected because value of IMSI is cached on MBIM modems. In case of suspend the IMSI will be always empty. Following patch fixes both issues (no IMSI after SIM unlocking and no detection of PIN lock state). It uses signal introduced for suspend support and sends this signal at the beggining of enabling_step function in mm-broadband-modem.