* [PATCH] udevng: complete gemalto setup
@ 2017-01-18 13:12 Vincent Cesson
2017-01-18 13:45 ` [PATCH v2] " Vincent Cesson
0 siblings, 1 reply; 3+ messages in thread
From: Vincent Cesson @ 2017-01-18 13:12 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1882 bytes --]
Complete the Gemalto setup with cdc_wdm and qmi so all enumerated devices are associated with gemalto.
---
plugins/udevng.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/plugins/udevng.c b/plugins/udevng.c
index 5c10794..7f1c300 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -915,7 +915,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;
+ const char *app = NULL, *gps = NULL, *mdm = NULL, *net = NULL, *qmi = NULL;
GSList *list;
@@ -934,10 +934,15 @@ static gboolean setup_gemalto(struct modem_info* modem)
app = info->devnode;
else if (g_strcmp0(info->number, "03") == 0)
mdm = info->devnode;
+ else if (g_strcmp0(info->subsystem, "net") == 0)
+ net = info->devnode;
+ else if (g_strcmp0(info->subsystem, "usbmisc") == 0)
+ qmi = info->devnode;
}
}
- DBG("application=%s gps=%s modem=%s", app, gps, mdm);
+ DBG("application=%s gps=%s modem=%s network=%s qmi=%s",
+ app, gps, mdm, net, qmi);
if (app == NULL || mdm == NULL)
return FALSE;
@@ -945,6 +950,8 @@ static gboolean setup_gemalto(struct modem_info* modem)
ofono_modem_set_string(modem->modem, "Application", app);
ofono_modem_set_string(modem->modem, "GPS", gps);
ofono_modem_set_string(modem->modem, "Modem", mdm);
+ ofono_modem_set_string(modem->modem, "Device", qmi);
+ ofono_modem_set_string(modem->modem, "NetworkInterface", net);
return TRUE;
}
@@ -1216,6 +1223,8 @@ static struct {
{ "ublox", "rndis_host", "1546", "1146" },
{ "ublox", "cdc_acm", "1546", "1146" },
{ "gemalto", "option", "1e2d", "0053" },
+ { "gemalto", "cdc_wdm", "1e2d", "0053" },
+ { "gemalto", "qmi_wwan", "1e2d", "0053" },
{ }
};
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] udevng: complete gemalto setup
2017-01-18 13:12 [PATCH] udevng: complete gemalto setup Vincent Cesson
@ 2017-01-18 13:45 ` Vincent Cesson
2017-01-19 2:20 ` Denis Kenzior
0 siblings, 1 reply; 3+ messages in thread
From: Vincent Cesson @ 2017-01-18 13:45 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]
Complete the Gemalto setup with cdc_wdm and qmi,
so all enumerated devices are associated with gemalto.
---
Change in v2:
- Fix codingstyle
plugins/udevng.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/plugins/udevng.c b/plugins/udevng.c
index 5c10794..5008912 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -915,7 +915,8 @@ static gboolean setup_ublox(struct modem_info *modem)
static gboolean setup_gemalto(struct modem_info* modem)
{
- const char *app = NULL, *gps = NULL, *mdm = NULL;
+ const char *app = NULL, *gps = NULL, *mdm = NULL,
+ *net = NULL, *qmi = NULL;
GSList *list;
@@ -934,10 +935,15 @@ static gboolean setup_gemalto(struct modem_info* modem)
app = info->devnode;
else if (g_strcmp0(info->number, "03") == 0)
mdm = info->devnode;
+ else if (g_strcmp0(info->subsystem, "net") == 0)
+ net = info->devnode;
+ else if (g_strcmp0(info->subsystem, "usbmisc") == 0)
+ qmi = info->devnode;
}
}
- DBG("application=%s gps=%s modem=%s", app, gps, mdm);
+ DBG("application=%s gps=%s modem=%s network=%s qmi=%s",
+ app, gps, mdm, net, qmi);
if (app == NULL || mdm == NULL)
return FALSE;
@@ -945,6 +951,8 @@ static gboolean setup_gemalto(struct modem_info* modem)
ofono_modem_set_string(modem->modem, "Application", app);
ofono_modem_set_string(modem->modem, "GPS", gps);
ofono_modem_set_string(modem->modem, "Modem", mdm);
+ ofono_modem_set_string(modem->modem, "Device", qmi);
+ ofono_modem_set_string(modem->modem, "NetworkInterface", net);
return TRUE;
}
@@ -1216,6 +1224,8 @@ static struct {
{ "ublox", "rndis_host", "1546", "1146" },
{ "ublox", "cdc_acm", "1546", "1146" },
{ "gemalto", "option", "1e2d", "0053" },
+ { "gemalto", "cdc_wdm", "1e2d", "0053" },
+ { "gemalto", "qmi_wwan", "1e2d", "0053" },
{ }
};
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] udevng: complete gemalto setup
2017-01-18 13:45 ` [PATCH v2] " Vincent Cesson
@ 2017-01-19 2:20 ` Denis Kenzior
0 siblings, 0 replies; 3+ messages in thread
From: Denis Kenzior @ 2017-01-19 2:20 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 360 bytes --]
Hi Vincent,
On 01/18/2017 07:45 AM, Vincent Cesson wrote:
> Complete the Gemalto setup with cdc_wdm and qmi,
> so all enumerated devices are associated with gemalto.
> ---
> Change in v2:
> - Fix codingstyle
>
> plugins/udevng.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
Applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-19 2:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18 13:12 [PATCH] udevng: complete gemalto setup Vincent Cesson
2017-01-18 13:45 ` [PATCH v2] " Vincent Cesson
2017-01-19 2:20 ` Denis Kenzior
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.