From 8d019a399ca8dd29f959477e2be36b252497a90b Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 28 Jul 2021 23:42:56 +0200 Subject: base-bearer: remove default multiplex support symbol Using "requested" as a common default for every possible implementation works, because it can handle setups without multiplexing capabilities (e.g. plain AT+PPP modems) and also setups without non-multiplexing capabilities (e.g. IPA based SoCs). But if we don't want "requested" as default, then there will be failing cases; e.g. we cannot use "none" as default for all as it would break IPA, and we cannot use "required" as default for all as it would break AT+PPP setups. So, remove the common default, it's not flexible enough. --- src/mm-base-bearer.h | 5 ----- src/mm-bearer-mbim.c | 4 ++-- src/mm-bearer-qmi.c | 4 ++-- src/mm-broadband-bearer.c | 4 ++-- 4 files changed, 6 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/mm-base-bearer.h b/src/mm-base-bearer.h index 151b8c30..993abaa4 100644 --- a/src/mm-base-bearer.h +++ b/src/mm-base-bearer.h @@ -67,11 +67,6 @@ gint mm_bearer_connect_result_get_profile_id (MMBearerConnec /*****************************************************************************/ -/* Default multiplex support setting to use when none explicitly given */ -#define MM_BASE_BEARER_MULTIPLEX_SUPPORT_DEFAULT MM_BEARER_MULTIPLEX_SUPPORT_REQUESTED - -/*****************************************************************************/ - #define MM_TYPE_BASE_BEARER (mm_base_bearer_get_type ()) #define MM_BASE_BEARER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_BASE_BEARER, MMBaseBearer)) #define MM_BASE_BEARER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MM_TYPE_BASE_BEARER, MMBaseBearerClass)) diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c index d3e3a2d7..dbdd0850 100644 --- a/src/mm-bearer-mbim.c +++ b/src/mm-bearer-mbim.c @@ -1179,10 +1179,10 @@ load_settings_from_bearer (MMBearerMbim *self, if (mm_kernel_device_get_wwandev_sysfs_path (mm_port_peek_kernel_device (ctx->data))) multiplex_supported = FALSE; - /* If no multiplex setting given by the user, assume default */ + /* If no multiplex setting given by the user, assume requested */ multiplex = mm_bearer_properties_get_multiplex (properties); if (multiplex == MM_BEARER_MULTIPLEX_SUPPORT_UNKNOWN) - multiplex = MM_BASE_BEARER_MULTIPLEX_SUPPORT_DEFAULT; + multiplex = MM_BEARER_MULTIPLEX_SUPPORT_REQUESTED; if (multiplex_supported && (multiplex == MM_BEARER_MULTIPLEX_SUPPORT_REQUESTED || diff --git a/src/mm-bearer-qmi.c b/src/mm-bearer-qmi.c index 0bb5b81c..86959765 100644 --- a/src/mm-bearer-qmi.c +++ b/src/mm-bearer-qmi.c @@ -2141,10 +2141,10 @@ load_settings_from_bearer (MMBearerQmi *self, GError *inner_error = NULL; const gchar *str; - /* If no multiplex setting given by the user, assume default */ + /* If no multiplex setting given by the user, assume requested */ ctx->multiplex = mm_bearer_properties_get_multiplex (properties); if (ctx->multiplex == MM_BEARER_MULTIPLEX_SUPPORT_UNKNOWN) - ctx->multiplex = MM_BASE_BEARER_MULTIPLEX_SUPPORT_DEFAULT; + ctx->multiplex = MM_BEARER_MULTIPLEX_SUPPORT_REQUESTED; /* The link prefix hint given must be modem-specific */ if (ctx->multiplex == MM_BEARER_MULTIPLEX_SUPPORT_REQUESTED || diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c index bfe16183..109e8741 100644 --- a/src/mm-broadband-bearer.c +++ b/src/mm-broadband-bearer.c @@ -1011,10 +1011,10 @@ connect (MMBaseBearer *self, return; } - /* If no multiplex setting given by the user, assume default */ + /* If no multiplex setting given by the user, assume requested */ multiplex = mm_bearer_properties_get_multiplex (mm_base_bearer_peek_config (MM_BASE_BEARER (self))); if (multiplex == MM_BEARER_MULTIPLEX_SUPPORT_UNKNOWN) - multiplex = MM_BASE_BEARER_MULTIPLEX_SUPPORT_DEFAULT; + multiplex = MM_BEARER_MULTIPLEX_SUPPORT_REQUESTED; /* The generic broadband bearer doesn't support multiplexing */ if (multiplex == MM_BEARER_MULTIPLEX_SUPPORT_REQUIRED) { -- cgit v1.2.3-70-g09d2