From 5b7ce438d9333b6add7b7924f9e2902d91dee335 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 12 Nov 2020 18:38:59 +0100 Subject: [PATCH] wwan: update default connection timeout to 200s The following merge request in ModemManager introduces a more or less common timeout value for the connection attempts in all plugin and protocol implementations: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/391 The value chosen by default for the steps that may take long to complete in a connection attempt is 180s, and 120s for the steps in the disconnection path. Until now, every different plugin or protocol had a different timeout value, all of them <= 180s, and with that change in ModemManager, the values are now aligned for all. Note, though, that this does not mean that a connection attempt will take always less than 180s, as there may be multiple other steps in addition to the one that took the maximum timeout. The value chosen for NetworkManager is a compromise between the new defaults from MM and what the user would expect under e.g. very low quality conditions. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/678 --- src/devices/wwan/nm-modem-broadband.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/devices/wwan/nm-modem-broadband.c b/src/devices/wwan/nm-modem-broadband.c index 633878cea0..7b3a13a372 100644 --- a/src/devices/wwan/nm-modem-broadband.c +++ b/src/devices/wwan/nm-modem-broadband.c @@ -39,8 +39,11 @@ MODEM_CAPS_3GPP(MMModemCapability caps) #define MODEM_CAPS_3GPP2(caps) (caps & (MM_MODEM_CAPABILITY_CDMA_EVDO)) -/* Maximum time to keep the DBus call waiting for a connection result */ -#define MODEM_CONNECT_TIMEOUT_SECS 120 +/* Maximum time to keep the DBus call waiting for a connection result. + * This value is greater than the default timeout in ModemManager (180s since + * 1.16), so that whenever possible the timeout happens first there instead of + * in NetworkManager. */ +#define MODEM_CONNECT_TIMEOUT_SECS 200 /*****************************************************************************/