diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2017-09-07 21:33:28 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2017-09-07 16:44:40 -0500 |
commit | 0b10110a87907ec84fa8b5b03fcbcc824d92efc5 (patch) | |
tree | 5e38f825e639b9200eec7c9a96b10223fcd1a6fa /plugins/udevng.c | |
parent | 76689b81d406372b12b6b55f4534a132499a1637 (diff) | |
download | ofono-0b10110a87907ec84fa8b5b03fcbcc824d92efc5.tar.gz |
udevng: use first cdc-wdm interface for sierra qmi
Using the voice firmware on a mc7304 the modem
stopped accepting qmi messages on the second
cdc-wdm interface.
Diffstat (limited to 'plugins/udevng.c')
-rw-r--r-- | plugins/udevng.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/plugins/udevng.c b/plugins/udevng.c index aa28bcb8..1e716a60 100644 --- a/plugins/udevng.c +++ b/plugins/udevng.c @@ -267,12 +267,28 @@ static gboolean setup_sierra(struct modem_info *modem) app = info->devnode; else if (g_strcmp0(info->number, "07") == 0) net = info->devnode; - else if (g_strcmp0(info->number, "0a") == 0) { - if (g_strcmp0(info->subsystem, "net") == 0) + else if (g_strcmp0(info->subsystem, "net") == 0) { + /* + * When using the voice firmware on a mc7304 + * the second cdc-wdm interface doesn't handle + * qmi messages properly. + * Some modems still have a working second + * cdc-wdm interface, some are not. But always + * the first interface works. + */ + if (g_strcmp0(info->number, "08") == 0) { net = info->devnode; - else if (g_strcmp0(info->subsystem, - "usbmisc") == 0) + } else if (g_strcmp0(info->number, "0a") == 0) { + if (net == NULL) + net = info->devnode; + } + } else if (g_strcmp0(info->subsystem, "usbmisc") == 0) { + if (g_strcmp0(info->number, "08") == 0) { qmi = info->devnode; + } else if (g_strcmp0(info->number, "0a") == 0) { + if (qmi == NULL) + qmi = info->devnode; + } } } } |