Skip to content

iface-modem: fix reporting state while registration is denied

When registration is denied, we should be reporting the modem with 'enabled' state instead of 'registered'. This was not happening because the logic to build the consolidated state (for 3GPP+3GPP2 modems) was using as default initial state the current old state, and so if the old one was 'registered' it never allowed getting a consolidated state of 'enabled', because 'registered' > 'enabled'.

Instead of using the old initial state, the consolidated modem state should use 'enabled' as default initial value, which is the lowest among 'enabled, 'searching' and 'registered'.

Merge request reports