From f6c1939f5c48ae7124212ef731c1fb552a8d6ee7 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 15 Aug 2022 21:59:17 +0000 Subject: broadband-modem-mbim: remove context type comparison on disconnection reports Since 1.18 the user can request a different APN type during the connection attempt, which translates into a different context type in the actual MBIM Connect Set request. Therefore, the context type of a given connection is no longer always INTERNET. Matching by the session id to report disconnections should be more than enough, which also helps to cover the case where the modem doesn't report the original context type used during the attempt (e.g. reporting NONE unconditionally). Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/614 --- src/mm-broadband-modem-mbim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c index 10eb2b95..602415d6 100644 --- a/src/mm-broadband-modem-mbim.c +++ b/src/mm-broadband-modem-mbim.c @@ -4651,8 +4651,7 @@ basic_connect_notification_connect (MMBroadbandModemMbim *self, if (!bearer_list) return; - if (mbim_uuid_to_context_type (context_type) == MBIM_CONTEXT_TYPE_INTERNET && - activation_state == MBIM_ACTIVATION_STATE_DEACTIVATED) { + if (activation_state == MBIM_ACTIVATION_STATE_DEACTIVATED) { ReportDisconnectedStatusContext ctx; g_autoptr(GError) connection_error = NULL; -- cgit v1.2.3-70-g09d2