MBIM disconnection reports ignored if context type doesn't match
The current logic processing MBIM disconnection reports compares the context type; if it's different to INTERNET, it ignores the report, and so ModemManager still thinks the modem is connected after that.
The fact that it checks for INTERNET unconditionally is wrong, as since some time ago ModemManager allows connecting data sessions specifying a different APN type, which in turn translates into a different context type requested to the modem, so it is not always INTERNET what would need to be compared to really.
But from another point of view, there doesn't seem to be any reason to do that context type comparison, the session id match should already be enough.
When the connection sequence in MBIM was originally developed, it worked only with INTERNET context types, and so that assumption was taken to match the disconnection reports. This change was reviewed in the MM mailing list in Feb 2014 and it didn't have any further comment, and got committed to the git repo as 705dd013.
In order to fix the wrong comparison (e.g. if a context type different to INTERNET was connected) or to handle the case where the modem doesn't provide the correct context type (e.g. NONE given instead), the context-type comparison should be removed and the match should happen only based on session-id.