aboutsummaryrefslogtreecommitdiff
path: root/src/mm-base-modem.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2014-09-05 08:47:30 +0200
committerAleksander Morgado <aleksander@aleksander.es>2014-09-05 08:48:00 +0200
commitd2544ac044aea6b24e2f60e71fb3c1291552a2f9 (patch)
tree9556572cebc9c1180560dbee54fad67a9613ed84 /src/mm-base-modem.c
parenta22681ba99f8249a5d516dca773b125c0bdf0912 (diff)
base-modem: always grab ports marked as ignored
Modems may expose ports that are either just not used (e.g. modems exposing more than 2 functional AT ports) or explicitly avoided (e.g. WWAN ports when we don't know how to use them). Those kind of ports are part of the modem, but not used by ModemManager. Still, ModemManager should list them in the list of ports available for the modem, with IGNORED type.
Diffstat (limited to 'src/mm-base-modem.c')
-rw-r--r--src/mm-base-modem.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mm-base-modem.c b/src/mm-base-modem.c
index faf391d7..84ecf8d2 100644
--- a/src/mm-base-modem.c
+++ b/src/mm-base-modem.c
@@ -202,8 +202,16 @@ mm_base_modem_grab_port (MMBaseModem *self,
return FALSE;
}
+ /* Explicitly ignored ports, grab them but explicitly flag them as ignored
+ * right away, all the same way (i.e. regardless of subsystem). */
+ if (ptype == MM_PORT_TYPE_IGNORED) {
+ port = MM_PORT (g_object_new (MM_TYPE_PORT,
+ MM_PORT_DEVICE, name,
+ MM_PORT_TYPE, MM_PORT_TYPE_IGNORED,
+ NULL));
+ }
/* Serial ports... */
- if (g_str_equal (subsys, "tty")) {
+ else if (g_str_equal (subsys, "tty")) {
if (ptype == MM_PORT_TYPE_QCDM)
/* QCDM port */
port = MM_PORT (mm_port_serial_qcdm_new (name));