All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] xmm7modem: Change in xmm7mode plugin for multi PDP handling
@ 2019-02-05 12:57 Antara Borwankar
  0 siblings, 0 replies; 5+ messages in thread
From: Antara Borwankar @ 2019-02-05 12:57 UTC (permalink / raw)
  To: ofono

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

Made changes in xmm7modem plugin to allow mutiple PDP context
activation and to assign correct network interface to the
activated PDP context.
---
 plugins/udevng.c  | 14 ++++++++++++--
 plugins/xmm7xxx.c | 21 +++++++++++++++++++++
 2 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/plugins/udevng.c b/plugins/udevng.c
index ff6e1fc..b14369c 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -1,4 +1,4 @@
-/*
+
  *
  *  oFono - Open Source Telephony
  *
@@ -1179,7 +1179,7 @@ static gboolean setup_gemalto(struct modem_info* modem)
 
 static gboolean setup_xmm7xxx(struct modem_info *modem)
 {
-	const char *mdm = NULL, *net = NULL;
+	const char *mdm = NULL, *net = NULL, *net2 = NULL, *net3 = NULL;
 	GSList *list;
 
 	DBG("%s %s\n", __DATE__, __TIME__);
@@ -1200,6 +1200,10 @@ static gboolean setup_xmm7xxx(struct modem_info *modem)
 			} else if (g_strcmp0(info->subsystem, "net") == 0) {
 				if (g_strcmp0(info->number, "06") == 0)
 					net = info->devnode;
+				if (g_strcmp0(info->number, "08") == 0)
+					net2 = info->devnode;
+				if (g_strcmp0(info->number, "0a") == 0)
+					net3 = info->devnode;
 			}
 		} else {
 			if (g_strcmp0(info->subsystem, "tty") == 0) {
@@ -1219,6 +1223,12 @@ static gboolean setup_xmm7xxx(struct modem_info *modem)
 
 	ofono_modem_set_string(modem->modem, "Modem", mdm);
 	ofono_modem_set_string(modem->modem, "NetworkInterface", net);
+	if (net2)
+		ofono_modem_set_string(modem->modem, "NetworkInterface2", net2);
+	if (net3)
+		ofono_modem_set_string(modem->modem, "NetworkInterface3", net3);
+	ofono_modem_set_string(modem->modem, "CtrlPath", "/USBCDC/0");
+	ofono_modem_set_string(modem->modem, "DataPath", "/USBHS/NCM/");
 
 	return TRUE;
 }
diff --git a/plugins/xmm7xxx.c b/plugins/xmm7xxx.c
index 237c62c..eaae4ad 100644
--- a/plugins/xmm7xxx.c
+++ b/plugins/xmm7xxx.c
@@ -1269,6 +1269,7 @@ static void xmm7xxx_post_online(struct ofono_modem *modem)
 	struct xmm7xxx_data *data = ofono_modem_get_data(modem);
 	struct ofono_gprs *gprs;
 	struct ofono_gprs_context *gc;
+	const char *interface = NULL;
 
 	DBG("%p", modem);
 
@@ -1282,6 +1283,26 @@ static void xmm7xxx_post_online(struct ofono_modem *modem)
 	if (gprs && gc)
 		ofono_gprs_add_context(gprs, gc);
 
+	interface = ofono_modem_get_string(modem, "NetworkInterface2");
+
+	if (interface) {
+		gc = ofono_gprs_context_create(modem, OFONO_VENDOR_XMM, "ifxmodem",
+					data->chat);
+
+		if (gprs && gc)
+			ofono_gprs_add_context(gprs, gc);
+	}
+
+	interface = ofono_modem_get_string(modem, "NetworkInterface3");
+
+	if (interface) {
+		gc = ofono_gprs_context_create(modem, OFONO_VENDOR_XMM, "ifxmodem",
+					data->chat);
+
+		if (gprs && gc)
+			ofono_gprs_add_context(gprs, gc);
+	}
+
 	ofono_ims_create(modem, "xmm7modem", data->chat);
 	ofono_netmon_create(modem, 0, "xmm7modem", data->chat);
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH 1/2] xmm7modem: Change in xmm7mode plugin for multi PDP handling
@ 2019-02-06  8:37 Antara Borwankar
  2019-02-11 23:58 ` Denis Kenzior
  0 siblings, 1 reply; 5+ messages in thread
From: Antara Borwankar @ 2019-02-06  8:37 UTC (permalink / raw)
  To: ofono

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

Made changes in xmm7modem plugin to allow mutiple PDP context
activation and to assign correct network interface to the
activated PDP context.
---
 plugins/udevng.c  | 12 +++++++++++-
 plugins/xmm7xxx.c | 21 +++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/plugins/udevng.c b/plugins/udevng.c
index ff6e1fc..e00b6ac 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -1179,7 +1179,7 @@ static gboolean setup_gemalto(struct modem_info* modem)
 
 static gboolean setup_xmm7xxx(struct modem_info *modem)
 {
-	const char *mdm = NULL, *net = NULL;
+	const char *mdm = NULL, *net = NULL, *net2 = NULL, *net3 = NULL;
 	GSList *list;
 
 	DBG("%s %s\n", __DATE__, __TIME__);
@@ -1200,6 +1200,10 @@ static gboolean setup_xmm7xxx(struct modem_info *modem)
 			} else if (g_strcmp0(info->subsystem, "net") == 0) {
 				if (g_strcmp0(info->number, "06") == 0)
 					net = info->devnode;
+				if (g_strcmp0(info->number, "08") == 0)
+					net2 = info->devnode;
+				if (g_strcmp0(info->number, "0a") == 0)
+					net3 = info->devnode;
 			}
 		} else {
 			if (g_strcmp0(info->subsystem, "tty") == 0) {
@@ -1219,6 +1223,12 @@ static gboolean setup_xmm7xxx(struct modem_info *modem)
 
 	ofono_modem_set_string(modem->modem, "Modem", mdm);
 	ofono_modem_set_string(modem->modem, "NetworkInterface", net);
+	if (net2)
+		ofono_modem_set_string(modem->modem, "NetworkInterface2", net2);
+	if (net3)
+		ofono_modem_set_string(modem->modem, "NetworkInterface3", net3);
+	ofono_modem_set_string(modem->modem, "CtrlPath", "/USBCDC/0");
+	ofono_modem_set_string(modem->modem, "DataPath", "/USBHS/NCM/");
 
 	return TRUE;
 }
diff --git a/plugins/xmm7xxx.c b/plugins/xmm7xxx.c
index 237c62c..eaae4ad 100644
--- a/plugins/xmm7xxx.c
+++ b/plugins/xmm7xxx.c
@@ -1269,6 +1269,7 @@ static void xmm7xxx_post_online(struct ofono_modem *modem)
 	struct xmm7xxx_data *data = ofono_modem_get_data(modem);
 	struct ofono_gprs *gprs;
 	struct ofono_gprs_context *gc;
+	const char *interface = NULL;
 
 	DBG("%p", modem);
 
@@ -1282,6 +1283,26 @@ static void xmm7xxx_post_online(struct ofono_modem *modem)
 	if (gprs && gc)
 		ofono_gprs_add_context(gprs, gc);
 
+	interface = ofono_modem_get_string(modem, "NetworkInterface2");
+
+	if (interface) {
+		gc = ofono_gprs_context_create(modem, OFONO_VENDOR_XMM, "ifxmodem",
+					data->chat);
+
+		if (gprs && gc)
+			ofono_gprs_add_context(gprs, gc);
+	}
+
+	interface = ofono_modem_get_string(modem, "NetworkInterface3");
+
+	if (interface) {
+		gc = ofono_gprs_context_create(modem, OFONO_VENDOR_XMM, "ifxmodem",
+					data->chat);
+
+		if (gprs && gc)
+			ofono_gprs_add_context(gprs, gc);
+	}
+
 	ofono_ims_create(modem, "xmm7modem", data->chat);
 	ofono_netmon_create(modem, 0, "xmm7modem", data->chat);
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH 1/2] xmm7modem: Change in xmm7mode plugin for multi PDP handling
@ 2019-01-31  6:18 Antara Borwankar
  2019-01-31 18:45 ` Denis Kenzior
  0 siblings, 1 reply; 5+ messages in thread
From: Antara Borwankar @ 2019-01-31  6:18 UTC (permalink / raw)
  To: ofono

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

Made changes in xmm7modem plugin to allow mutiple PDP context
activation and to assign correct network interface to the
activated PDP context.
---
 plugins/udevng.c  |  2 ++
 plugins/xmm7xxx.c | 12 ++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/plugins/udevng.c b/plugins/udevng.c
index ff6e1fc..353a7dd 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -1219,6 +1219,8 @@ static gboolean setup_xmm7xxx(struct modem_info *modem)
 
 	ofono_modem_set_string(modem->modem, "Modem", mdm);
 	ofono_modem_set_string(modem->modem, "NetworkInterface", net);
+	ofono_modem_set_string(modem->modem, "CtrlPath", "/USBCDC/0");
+	ofono_modem_set_string(modem->modem, "DataPath", "/USBHS/NCM/");
 
 	return TRUE;
 }
diff --git a/plugins/xmm7xxx.c b/plugins/xmm7xxx.c
index 237c62c..8b775e0 100644
--- a/plugins/xmm7xxx.c
+++ b/plugins/xmm7xxx.c
@@ -1282,6 +1282,18 @@ static void xmm7xxx_post_online(struct ofono_modem *modem)
 	if (gprs && gc)
 		ofono_gprs_add_context(gprs, gc);
 
+	gc = ofono_gprs_context_create(modem, OFONO_VENDOR_XMM, "ifxmodem",
+					data->chat);
+
+	if (gprs && gc)
+		ofono_gprs_add_context(gprs, gc);
+
+	gc = ofono_gprs_context_create(modem, OFONO_VENDOR_XMM, "ifxmodem",
+					data->chat);
+
+	if (gprs && gc)
+		ofono_gprs_add_context(gprs, gc);
+
 	ofono_ims_create(modem, "xmm7modem", data->chat);
 	ofono_netmon_create(modem, 0, "xmm7modem", data->chat);
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-02-11 23:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-05 12:57 [PATCH 1/2] xmm7modem: Change in xmm7mode plugin for multi PDP handling Antara Borwankar
  -- strict thread matches above, loose matches on Subject: below --
2019-02-06  8:37 Antara Borwankar
2019-02-11 23:58 ` Denis Kenzior
2019-01-31  6:18 Antara Borwankar
2019-01-31 18:45 ` 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.