[PATCH 2/3] bearer-mbim: increase timeout for deactivating IP session to 60s

Ben Chan benchan at chromium.org
Thu Feb 1 05:57:08 UTC 2018

Since commit 0c7f3380a ("bearer-mbim: ensure session is disconnected
before trying to connect"), MMBearerMbim always issues a
MBIM_CID_CONNECT (MBIMActivationCommandDeactivate) command before a
MBIM_CID_CONNECT (MBIMActivationCommandActivate) command during a
connection attempt. That is to ensure that an IP session is actually
deactivated before we try to activate a new IP session.

Unfortunately, it's been observed on Huawei ME936 that it takes more
than 30s for the modem to respond to a MBIM_CID_CONNECT
(MBIMActivationCommandDeactivate) command when trying to deactivate a
session that hasn't been activated.

When the signal is weak, it's also possible that a modem takes more than
30s to deactivate an IP session during a disconnection attempt.

This patch increases the timeout for deactivating an IP session from 30s
to 60s in both connection and disconnection attempt.
 src/mm-bearer-mbim.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c
index 4535018b..f7c721b6 100644
--- a/src/mm-bearer-mbim.c
+++ b/src/mm-bearer-mbim.c
@@ -851,7 +851,7 @@ connect_context_step (GTask *task)
         mbim_device_command (ctx->device,
-                             30,
+                             60,
@@ -1254,7 +1254,7 @@ disconnect_context_step (GTask *task)
         mbim_device_command (ctx->device,
-                             30,
+                             60,

More information about the ModemManager-devel mailing list