bearer-mbim: enable multiplex support for wwan devices
This commit is contained in:
@@ -413,7 +413,7 @@ dnl-----------------------------------------------------------------------------
|
||||
dnl MBIM support (enabled by default)
|
||||
dnl
|
||||
|
||||
LIBMBIM_VERSION=1.27.7
|
||||
LIBMBIM_VERSION=1.27.8
|
||||
|
||||
AC_ARG_WITH(mbim, AS_HELP_STRING([--without-mbim], [Build without MBIM support]), [], [with_mbim=yes])
|
||||
AM_CONDITIONAL(WITH_MBIM, test "x$with_mbim" = "xyes")
|
||||
|
@@ -243,7 +243,7 @@ config_h.set('WITH_AT_COMMAND_VIA_DBUS', enable_at_command_via_dbus)
|
||||
# MBIM support (enabled by default)
|
||||
enable_mbim = get_option('mbim')
|
||||
if enable_mbim
|
||||
mbim_glib_dep = dependency('mbim-glib', version: '>= 1.27.7')
|
||||
mbim_glib_dep = dependency('mbim-glib', version: '>= 1.27.8')
|
||||
endif
|
||||
config_h.set('WITH_MBIM', enable_mbim)
|
||||
|
||||
|
@@ -1340,9 +1340,6 @@ load_settings_from_bearer (MMBearerMbim *self,
|
||||
if (!g_strcmp0 (data_port_driver, "mhi_net"))
|
||||
multiplex_supported = FALSE;
|
||||
|
||||
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 none */
|
||||
multiplex = mm_bearer_properties_get_multiplex (properties);
|
||||
if (multiplex == MM_BEARER_MULTIPLEX_SUPPORT_UNKNOWN) {
|
||||
|
@@ -234,6 +234,27 @@ mm_device_grab_port (MMDevice *self,
|
||||
error->message);
|
||||
return;
|
||||
}
|
||||
if (!g_strcmp0 ("net", mm_kernel_device_get_subsystem (kernel_port)) &&
|
||||
mm_kernel_device_get_wwandev_sysfs_path (kernel_port)) {
|
||||
/* This is a wwan netdevice, possibly a multiplexed one.
|
||||
* Multiplexed wwan netdevices do not have a lower device, so they won't fall in the
|
||||
* previous check verified for virtual ports, but require the same management.
|
||||
* However, we need to make sure that the arrived netdevice is not the default one that
|
||||
* instead requires the standard flow: for doing this we check that the name of the
|
||||
* arrived netdevice is not the default one, found in the wwandev_sysfs_path */
|
||||
if (!g_strstr_len (mm_kernel_device_get_wwandev_sysfs_path (kernel_port),
|
||||
-1,
|
||||
mm_kernel_device_get_name (kernel_port))) {
|
||||
g_autoptr(GError) error = NULL;
|
||||
|
||||
mm_obj_dbg (self, "grabbing wwan multiplexed device %s", mm_kernel_device_get_name (kernel_port));
|
||||
if (self->priv->modem && !mm_base_modem_grab_link_port (self->priv->modem, kernel_port, &error))
|
||||
mm_obj_dbg (self, "fully ignoring link port %s from now on: %s",
|
||||
mm_kernel_device_get_name (kernel_port),
|
||||
error->message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Get the vendor/product IDs out of the first one that gives us
|
||||
* some valid value (it seems we may get NULL reported for VID in QMI
|
||||
|
Reference in New Issue
Block a user