diff options
author | Sergey Matyukevich <geomatsi@gmail.com> | 2020-08-18 23:43:46 +0300 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2020-08-19 09:50:41 -0500 |
commit | 71ceaf93fd652c6ec0b7238394bbe2e40042085c (patch) | |
tree | f479e8c21b04247c8c2919634837db75e926cfce | |
parent | da1ef6588b42f2f92fd5db9e6c6889d851fb2e72 (diff) | |
download | ofono-71ceaf93fd652c6ec0b7238394bbe2e40042085c.tar.gz |
plugins: udevng: detect gemalto network interfaces
Some gemalto modems, including ELS81x, may provide more than one
USB ethernet interface. Detect and save both network interfaces
rather than only the last one.
-rw-r--r-- | plugins/udevng.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/udevng.c b/plugins/udevng.c index 7e6a3ab7..839fabdb 100644 --- a/plugins/udevng.c +++ b/plugins/udevng.c @@ -1162,7 +1162,7 @@ static gboolean setup_ublox(struct modem_info *modem) static gboolean setup_gemalto(struct modem_info* modem) { const char *app = NULL, *gps = NULL, *mdm = NULL, - *net = NULL, *qmi = NULL; + *net = NULL, *qmi = NULL, *net2 = NULL; GSList *list; @@ -1197,9 +1197,14 @@ static gboolean setup_gemalto(struct modem_info* modem) else if (g_strcmp0(info->number, "04") == 0) gps = info->devnode; } + if (g_strcmp0(info->interface, "2/6/0") == 0) { - if (g_strcmp0(info->subsystem, "net") == 0) - net = info->devnode; + if (g_strcmp0(info->subsystem, "net") == 0) { + if (g_strcmp0(info->number, "0a") == 0) + net = info->devnode; + if (g_strcmp0(info->number, "0c") == 0) + net2 = info->devnode; + } } } @@ -1216,6 +1221,9 @@ static gboolean setup_gemalto(struct modem_info* modem) ofono_modem_set_string(modem->modem, "Model", modem->model); ofono_modem_set_string(modem->modem, "NetworkInterface", net); + if (net2) + ofono_modem_set_string(modem->modem, "NetworkInterface2", net2); + return TRUE; } |