bearer-mbim: check if IP session is activated before deactivating it

It may be undesirable to issue a MBIM_CID_CONNECT
(MBIMActivationCommandDeactivate) command to deactivate an IP session
when the session isn't activated. For instance, it's been observed on
Huawei ME936 that it takes more than 30s for the modem to deactivate a
not-yet-activated session. This patch modifies MMBearerMbim to query if
a session is activated before trying to deactivate the session during a
connection attempt.

(cherry picked from commit 636c245cd37bcddf6f354cbd53eb88ccf8104387)

BUG=chromium:800515
TEST=Tested cellular connectivity on a DUT with Huawei ME936 modem.

Change-Id: I3bf629f801ab6f0465aaa306b94c36272d18cedb
Reviewed-on: https://chromium-review.googlesource.com/904769
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
1 file changed