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.
This commit is contained in:
Aleksander Morgado
2021-07-28 23:42:56 +02:00
parent 4a07ab39f1
commit 8d019a399c
4 changed files with 6 additions and 11 deletions

View File

@@ -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))

View File

@@ -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 ||

View File

@@ -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 ||

View File

@@ -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) {