plugin: allow probing non-tty AT ports
This commit is contained in:
@@ -718,21 +718,27 @@ mm_plugin_supports_port (MMPlugin *self,
|
|||||||
probe_run_flags |= MM_PORT_PROBE_AT;
|
probe_run_flags |= MM_PORT_PROBE_AT;
|
||||||
else if (self->priv->single_at)
|
else if (self->priv->single_at)
|
||||||
probe_run_flags |= MM_PORT_PROBE_AT;
|
probe_run_flags |= MM_PORT_PROBE_AT;
|
||||||
if (need_vendor_probing)
|
|
||||||
probe_run_flags |= (MM_PORT_PROBE_AT | MM_PORT_PROBE_AT_VENDOR);
|
|
||||||
if (need_product_probing)
|
|
||||||
probe_run_flags |= (MM_PORT_PROBE_AT | MM_PORT_PROBE_AT_PRODUCT);
|
|
||||||
if (self->priv->qcdm)
|
if (self->priv->qcdm)
|
||||||
probe_run_flags |= MM_PORT_PROBE_QCDM;
|
probe_run_flags |= MM_PORT_PROBE_QCDM;
|
||||||
if (self->priv->icera_probe || self->priv->allowed_icera || self->priv->forbidden_icera)
|
|
||||||
probe_run_flags |= (MM_PORT_PROBE_AT | MM_PORT_PROBE_AT_ICERA);
|
|
||||||
} else {
|
} else {
|
||||||
/* cdc-wdm ports... */
|
/* cdc-wdm ports... */
|
||||||
probe_run_flags = MM_PORT_PROBE_NONE;
|
probe_run_flags = MM_PORT_PROBE_NONE;
|
||||||
if (self->priv->qmi && find_driver_in_device (device, "qmi_wwan"))
|
if (self->priv->qmi && find_driver_in_device (device, "qmi_wwan"))
|
||||||
probe_run_flags |= MM_PORT_PROBE_QMI;
|
probe_run_flags |= MM_PORT_PROBE_QMI;
|
||||||
if (self->priv->mbim && find_driver_in_device (device, "cdc_mbim"))
|
else if (self->priv->mbim && find_driver_in_device (device, "cdc_mbim"))
|
||||||
probe_run_flags |= MM_PORT_PROBE_MBIM;
|
probe_run_flags |= MM_PORT_PROBE_MBIM;
|
||||||
|
else
|
||||||
|
probe_run_flags |= MM_PORT_PROBE_AT;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For potential AT ports, check for more things */
|
||||||
|
if (probe_run_flags & MM_PORT_PROBE_AT) {
|
||||||
|
if (need_vendor_probing)
|
||||||
|
probe_run_flags |= MM_PORT_PROBE_AT_VENDOR;
|
||||||
|
if (need_product_probing)
|
||||||
|
probe_run_flags |= MM_PORT_PROBE_AT_PRODUCT;
|
||||||
|
if (self->priv->icera_probe || self->priv->allowed_icera || self->priv->forbidden_icera)
|
||||||
|
probe_run_flags |= MM_PORT_PROBE_AT_ICERA;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If no explicit probing was required, just request to grab it without probing anything.
|
/* If no explicit probing was required, just request to grab it without probing anything.
|
||||||
|
@@ -1177,7 +1177,7 @@ serial_open_at (MMPortProbe *self)
|
|||||||
|
|
||||||
g_object_set (task->serial,
|
g_object_set (task->serial,
|
||||||
MM_PORT_SERIAL_SPEW_CONTROL, TRUE,
|
MM_PORT_SERIAL_SPEW_CONTROL, TRUE,
|
||||||
MM_PORT_SERIAL_SEND_DELAY, task->at_send_delay,
|
MM_PORT_SERIAL_SEND_DELAY, (subsys == MM_PORT_SUBSYS_TTY ? task->at_send_delay : 0),
|
||||||
MM_PORT_SERIAL_AT_REMOVE_ECHO, task->at_remove_echo,
|
MM_PORT_SERIAL_AT_REMOVE_ECHO, task->at_remove_echo,
|
||||||
MM_PORT_SERIAL_AT_SEND_LF, task->at_send_lf,
|
MM_PORT_SERIAL_AT_SEND_LF, task->at_send_lf,
|
||||||
NULL);
|
NULL);
|
||||||
@@ -1399,9 +1399,7 @@ mm_port_probe_is_at (MMPortProbe *self)
|
|||||||
|
|
||||||
subsys = g_udev_device_get_subsystem (self->priv->port);
|
subsys = g_udev_device_get_subsystem (self->priv->port);
|
||||||
name = g_udev_device_get_name (self->priv->port);
|
name = g_udev_device_get_name (self->priv->port);
|
||||||
if (g_str_equal (subsys, "net") ||
|
if (g_str_equal (subsys, "net"))
|
||||||
(g_str_has_prefix (subsys, "usb") &&
|
|
||||||
g_str_has_prefix (name, "cdc-wdm")))
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return (self->priv->flags & MM_PORT_PROBE_AT ?
|
return (self->priv->flags & MM_PORT_PROBE_AT ?
|
||||||
|
Reference in New Issue
Block a user