zte: ignore net ports in non-Icera based modems
Plain non-Icera ZTE modems will use ATD calls and PPP to establish the connection, so ignore 'net' ports that may be found in the way (e.g. when the modem is a QMI modem and we're not using QMI support).
This commit is contained in:
@@ -82,9 +82,20 @@ grab_port (MMPlugin *self,
|
||||
{
|
||||
GUdevDevice *port;
|
||||
MMAtPortFlag pflags = MM_AT_PORT_FLAG_NONE;
|
||||
MMPortType ptype;
|
||||
|
||||
port = mm_port_probe_peek_port (probe);
|
||||
|
||||
/* Ignore net ports on non-Icera modems */
|
||||
ptype = mm_port_probe_get_port_type (probe);
|
||||
if (ptype == MM_PORT_TYPE_NET && !MM_IS_BROADBAND_MODEM_ZTE_ICERA (modem)) {
|
||||
g_set_error (error,
|
||||
MM_CORE_ERROR,
|
||||
MM_CORE_ERROR_UNSUPPORTED,
|
||||
"Ignoring net port in non-Icera ZTE modem");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (mm_port_probe_is_at (probe)) {
|
||||
/* Look for port type hints */
|
||||
if (g_udev_device_get_property_as_boolean (port, "ID_MM_ZTE_PORT_TYPE_MODEM"))
|
||||
@@ -103,7 +114,7 @@ grab_port (MMPlugin *self,
|
||||
return mm_base_modem_grab_port (modem,
|
||||
mm_port_probe_get_port_subsys (probe),
|
||||
mm_port_probe_get_port_name (probe),
|
||||
mm_port_probe_get_port_type (probe),
|
||||
ptype,
|
||||
pflags,
|
||||
error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user