All of lore.kernel.org
 help / color / mirror / Atom feed
From: Piotr Haber <gluedig@gmail.com>
To: ofono@ofono.org
Subject: [PATCH 2/3] udevng: setup of Telit LE910V2
Date: Fri, 27 Jan 2017 10:54:23 +0100	[thread overview]
Message-ID: <20170127095424.19685-3-gluedig@gmail.com> (raw)
In-Reply-To: <20170127095424.19685-1-gluedig@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1993 bytes --]

Setup LE910V2 in default USB composition (1bc7:0036)
with 6 CDC-ACM serial ports and 1 CDC-NCM network adapter.
---
 plugins/udevng.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/plugins/udevng.c b/plugins/udevng.c
index 2f1da62b..098e0651 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -656,7 +656,7 @@ static gboolean setup_telit(struct modem_info *modem)
 
 static gboolean setup_xe910(struct modem_info *modem)
 {
-	const char *mdm = NULL, *aux = NULL, *gps = NULL;
+	const char *mdm = NULL, *aux = NULL, *gps = NULL, *net = NULL;
 	GSList *list;
 
 	DBG("%s", modem->syspath);
@@ -674,18 +674,24 @@ static gboolean setup_xe910(struct modem_info *modem)
 				aux = info->devnode;
 			else if (g_strcmp0(info->number, "0a") == 0)
 				gps = info->devnode;
+		} else if (info->sysattr && (g_str_has_suffix(info->sysattr,
+						"CDC NCM") == TRUE)) {
+			net = info->devnode;
 		}
 	}
 
 	if (aux == NULL || mdm == NULL)
 		return FALSE;
 
-	DBG("modem=%s aux=%s gps=%s", mdm, aux, gps);
+	DBG("modem=%s aux=%s gps=%s net=%s", mdm, aux, gps, net);
 
 	ofono_modem_set_string(modem->modem, "Modem", mdm);
 	ofono_modem_set_string(modem->modem, "Aux", aux);
 	ofono_modem_set_string(modem->modem, "GPS", gps);
 
+	if (net != NULL)
+		ofono_modem_set_string(modem->modem, "NetworkInterface", net);
+
 	return TRUE;
 }
 
@@ -976,7 +982,7 @@ static struct {
 	{ "novatel",	setup_novatel	},
 	{ "nokia",	setup_nokia	},
 	{ "telit",	setup_telit	},
-	{ "xe910",	setup_xe910	},
+	{ "xe910",	setup_xe910,	"device/interface"	},
 	{ "simcom",	setup_simcom	},
 	{ "zte",	setup_zte	},
 	{ "icera",	setup_icera	},
@@ -1226,6 +1232,8 @@ static struct {
 	{ "gemalto",	"option",	"1e2d",	"0053"	},
 	{ "gemalto",	"cdc_wdm",	"1e2d",	"0053"	},
 	{ "gemalto",	"qmi_wwan",	"1e2d",	"0053"	},
+	{ "xe910",	"cdc_ncm",	"1bc7", "0036"	},
+	{ "xe910",	"cdc_acm",	"1bc7", "0036"	},
 	{ }
 };
 
-- 
2.11.0


  parent reply	other threads:[~2017-01-27  9:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27  9:54 [PATCH 0/3] support Telit LE910 V2 modem Piotr Haber
2017-01-27  9:54 ` [PATCH 1/3] telitmodem: support for CDC-NCM network adapter Piotr Haber
2017-01-28  2:36   ` Denis Kenzior
2017-01-27  9:54 ` Piotr Haber [this message]
2017-01-28  2:30   ` [PATCH 2/3] udevng: setup of Telit LE910V2 Denis Kenzior
2017-01-27  9:54 ` [PATCH 3/3] xe910: support for Telit LE910V2 modem Piotr Haber
2017-01-28  2:37   ` 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=20170127095424.19685-3-gluedig@gmail.com \
    --to=gluedig@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.