diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2021-07-13 15:47:38 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-07-13 15:47:38 +0200 |
commit | daf72fe169f40bcb637a0a4db1a763bd54909d20 (patch) | |
tree | 6bf3b4dbf266dd0dfceac27a68fc80eaf155ea0d /src/mm-bearer-mbim.c | |
parent | c4b5879e45cce3eed6136131cefcdfd3f9590916 (diff) |
base-bearer: setup common default for unknown multiplex fallback
If the user doesn't provide a specific multiplex setting, we'll
fallback to a predefined default.
For now, the default is REQUESTED.
Diffstat (limited to 'src/mm-bearer-mbim.c')
-rw-r--r-- | src/mm-bearer-mbim.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c index 1d894b33..101c75cd 100644 --- a/src/mm-bearer-mbim.c +++ b/src/mm-bearer-mbim.c @@ -1172,11 +1172,13 @@ load_settings_from_bearer (MMBearerMbim *self, if (!g_strcmp0 (data_port_driver, "mhi_net")) multiplex_supported = FALSE; - /* If no multiplex setting given by the user, assume requested */ + /* If no multiplex setting given by the user, assume default */ multiplex = mm_bearer_properties_get_multiplex (properties); + if (multiplex == MM_BEARER_MULTIPLEX_SUPPORT_UNKNOWN) + multiplex = MM_BASE_BEARER_MULTIPLEX_SUPPORT_DEFAULT; + if (multiplex_supported && - (multiplex == MM_BEARER_MULTIPLEX_SUPPORT_UNKNOWN || - multiplex == MM_BEARER_MULTIPLEX_SUPPORT_REQUESTED || + (multiplex == MM_BEARER_MULTIPLEX_SUPPORT_REQUESTED || multiplex == MM_BEARER_MULTIPLEX_SUPPORT_REQUIRED)) { /* the link prefix hint given must be modem-specific */ ctx->link_prefix_hint = g_strdup_printf ("mbimmux%u.", mm_base_modem_get_dbus_id (MM_BASE_MODEM (ctx->modem))); |