From: Sergey Matyukevich <geomatsi@gmail.com>
To: ofono@ofono.org
Subject: [RFC PATCH 2/4] plugins: udevng: detect gemalto network interfaces
Date: Sun, 16 Aug 2020 00:43:56 +0300 [thread overview]
Message-ID: <20200815214358.69100-3-geomatsi@gmail.com> (raw)
In-Reply-To: <20200815214358.69100-1-geomatsi@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1581 bytes --]
Some gemalto modems, including ELS81x, may provide more than one
USB ethernet interface. Detect and save both network interfaces
rather than the last one.
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
plugins/udevng.c | 14 +++++++++++---
1 file 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;
}
--
2.28.0
next prev parent reply other threads:[~2020-08-15 21:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-15 21:43 [RFC PATCH 0/4] gemalto: USB ethernet data path for ELS81x Sergey Matyukevich
2020-08-15 21:43 ` [RFC PATCH 1/4] drivers: gemalto: add gprs-context driver Sergey Matyukevich
2020-08-17 19:23 ` Denis Kenzior
2020-08-15 21:43 ` Sergey Matyukevich [this message]
2020-08-15 21:43 ` [RFC PATCH 3/4] plugins: gemalto: add optional " Sergey Matyukevich
2020-08-15 21:43 ` [RFC PATCH 4/4] plugins: gemalto: fix incomplete at-chat shutdown Sergey Matyukevich
2020-08-17 16:56 ` Sergey Matyukevich
2020-08-17 19:54 ` Denis Kenzior
2020-08-17 20:22 ` Sergey Matyukevich
2020-08-18 9:06 ` Martin =?unknown-8bit?q?Hundeb=C3=B8ll?=
2020-08-18 14:33 ` Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200815214358.69100-3-geomatsi@gmail.com \
--to=geomatsi@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.