aboutsummaryrefslogtreecommitdiff
path: root/src/mm-device.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-04-11 11:38:49 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-08-29 17:14:47 +0200
commit306b4eb5094fb4f46120b41a104e937d0f41e1e9 (patch)
tree263004eceb6af16d878724dda420888bc8f9c2cf /src/mm-device.c
parentab67c0b7c363198078c49b6003c4a2cbdffa6694 (diff)
core: allow grabbing QMI ports
Diffstat (limited to 'src/mm-device.c')
-rw-r--r--src/mm-device.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mm-device.c b/src/mm-device.c
index 6af43dae..faf7c942 100644
--- a/src/mm-device.c
+++ b/src/mm-device.c
@@ -140,6 +140,17 @@ get_device_ids (GUdevDevice *device,
/* Platform devices don't usually have a VID/PID */
success = TRUE;
goto out;
+ } else if (!strcmp (parent_subsys, "usb") &&
+ !strcmp (g_udev_device_get_driver (parent), "qmi_wwan")) {
+ /* Need to look for vendor/product in the parent of the QMI device */
+ GUdevDevice *qmi_parent;
+
+ qmi_parent = g_udev_device_get_parent (parent);
+ if (qmi_parent) {
+ vid = g_udev_device_get_property (qmi_parent, "ID_VENDOR_ID");
+ pid = g_udev_device_get_property (qmi_parent, "ID_MODEL_ID");
+ g_object_unref (qmi_parent);
+ }
}
}
}