diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-10-25 14:05:50 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-11-09 18:41:57 +0100 |
commit | 7faa3a5e2518765bb3683c26ecdf3155046424b0 (patch) | |
tree | 8114122cf8fb8d7f19853652934c7a54348e485a | |
parent | 4ec2db75b8fc1175c12d007ca64d2edcf630e3cc (diff) |
port-mbim: allow specifying input subsystem
We have assumed until now that all MBIM ports are based on the
cdc_mbim driver, exposed in the 'usbmisc' subsystem by the cdc-wdm
driver.
This may no longer be true, so allow creating MBIM ports with
an explicit subsystem instead of defaulting always to USBMISC.
-rw-r--r-- | src/mm-base-modem.c | 2 | ||||
-rw-r--r-- | src/mm-port-mbim.c | 5 | ||||
-rw-r--r-- | src/mm-port-mbim.h | 3 | ||||
-rw-r--r-- | src/mm-port-probe.c | 3 |
4 files changed, 8 insertions, 5 deletions
diff --git a/src/mm-base-modem.c b/src/mm-base-modem.c index d5b20b45..7dd461f5 100644 --- a/src/mm-base-modem.c +++ b/src/mm-base-modem.c @@ -230,7 +230,7 @@ base_modem_create_usbmisc_port (MMBaseModem *self, #endif #if defined WITH_MBIM if (ptype == MM_PORT_TYPE_MBIM) - return MM_PORT (mm_port_mbim_new (name)); + return MM_PORT (mm_port_mbim_new (name, MM_PORT_SUBSYS_USBMISC)); #endif if (ptype == MM_PORT_TYPE_AT) return MM_PORT (mm_port_serial_at_new (name, MM_PORT_SUBSYS_USBMISC)); diff --git a/src/mm-port-mbim.c b/src/mm-port-mbim.c index 72004da1..57b7cf02 100644 --- a/src/mm-port-mbim.c +++ b/src/mm-port-mbim.c @@ -589,11 +589,12 @@ mm_port_mbim_peek_device (MMPortMbim *self) /*****************************************************************************/ MMPortMbim * -mm_port_mbim_new (const gchar *name) +mm_port_mbim_new (const gchar *name, + MMPortSubsys subsys) { return MM_PORT_MBIM (g_object_new (MM_TYPE_PORT_MBIM, MM_PORT_DEVICE, name, - MM_PORT_SUBSYS, MM_PORT_SUBSYS_USBMISC, + MM_PORT_SUBSYS, subsys, MM_PORT_TYPE, MM_PORT_TYPE_MBIM, NULL)); } diff --git a/src/mm-port-mbim.h b/src/mm-port-mbim.h index c0bd7988..8b37e99b 100644 --- a/src/mm-port-mbim.h +++ b/src/mm-port-mbim.h @@ -53,7 +53,8 @@ struct _MMPortMbimClass { GType mm_port_mbim_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMPortMbim, g_object_unref) -MMPortMbim *mm_port_mbim_new (const gchar *name); +MMPortMbim *mm_port_mbim_new (const gchar *name, + MMPortSubsys subsys); void mm_port_mbim_open (MMPortMbim *self, #if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED diff --git a/src/mm-port-probe.c b/src/mm-port-probe.c index 2a6cdf16..bfbe861c 100644 --- a/src/mm-port-probe.c +++ b/src/mm-port-probe.c @@ -566,7 +566,8 @@ wdm_probe_mbim (MMPortProbe *self) mm_obj_dbg (self, "probing MBIM..."); /* Create a port and try to open it */ - ctx->mbim_port = mm_port_mbim_new (mm_kernel_device_get_name (self->priv->port)); + ctx->mbim_port = mm_port_mbim_new (mm_kernel_device_get_name (self->priv->port), + MM_PORT_SUBSYS_USBMISC); mm_port_mbim_open (ctx->mbim_port, #if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED FALSE, /* Don't check QMI over MBIM support at this stage */ |