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.
This commit is contained in:
@@ -202,8 +202,16 @@ mm_base_modem_grab_port (MMBaseModem *self,
|
|||||||
return FALSE;
|
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... */
|
/* Serial ports... */
|
||||||
if (g_str_equal (subsys, "tty")) {
|
else if (g_str_equal (subsys, "tty")) {
|
||||||
if (ptype == MM_PORT_TYPE_QCDM)
|
if (ptype == MM_PORT_TYPE_QCDM)
|
||||||
/* QCDM port */
|
/* QCDM port */
|
||||||
port = MM_PORT (mm_port_serial_qcdm_new (name));
|
port = MM_PORT (mm_port_serial_qcdm_new (name));
|
||||||
|
Reference in New Issue
Block a user