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.
master
Sergey Matyukevich 3 years ago committed by Denis Kenzior
parent da1ef6588b
commit 71ceaf93fd

@ -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;
}

Loading…
Cancel
Save