diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-12-27 06:48:23 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-12-27 08:48:10 +0100 |
commit | 4ffa871228fa9b267f1647bf73238811e20e51b7 (patch) | |
tree | b23d0c94012ee92340733a478255acd94b6c0bbe | |
parent | ded8bfe96585088629f5d70369fbe9f39f4e54b5 (diff) | |
download | ModemManager-4ffa871228fa9b267f1647bf73238811e20e51b7.tar.gz |
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).
-rw-r--r-- | plugins/zte/mm-plugin-zte.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/zte/mm-plugin-zte.c b/plugins/zte/mm-plugin-zte.c index 75c879cf4..da3cc06a9 100644 --- a/plugins/zte/mm-plugin-zte.c +++ b/plugins/zte/mm-plugin-zte.c @@ -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); } |