netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cdc_ether: flag the Cinterion PLS8 modem by gemalto as WWAN
@ 2018-02-27 11:49 Bassem Boubaker
  2018-02-27 12:29 ` Bjørn Mork
  2018-02-27 13:04 ` Bassem Boubaker
  0 siblings, 2 replies; 6+ messages in thread
From: Bassem Boubaker @ 2018-02-27 11:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: bassem.boubaker, Oliver Neukum, linux-usb, netdev

    The Cinterion PL8 is an LTE modem with 2 possible WWAN interfaces.

    The modem is  controlled via AT commands through the exposed TTYs.

    AT^SWWAN write command can be used to activate or deactivate a WWAN
    connection for a PDP context defined with AT+CGDCONT. UE supports
    two WWAN adapter. Both WWAN adapters can be activated a the same time

Signed-off-by: Bassem Boubaker <bassem.boubaker@actia.fr>
---
 drivers/net/usb/cdc_ether.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 05dca3e..65621fe 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -562,6 +562,7 @@ static const struct driver_info wwan_info = {
 #define MICROSOFT_VENDOR_ID	0x045e
 #define UBLOX_VENDOR_ID		0x1546
 #define TPLINK_VENDOR_ID	0x2357
+#define GEMALTO_VENDOR_ID	0x1e2d
 
 static const struct usb_device_id	products[] = {
 /* BLACKLIST !!
@@ -896,6 +897,12 @@ static const struct usb_device_id	products[] = {
 				      USB_CDC_PROTO_NONE),
 	.driver_info = (unsigned long)&wwan_info,
 }, {
+	/* Cinterion PLS8 modem by GEMALTO */
+	USB_DEVICE_AND_INTERFACE_INFO(GEMALTO_VENDOR_ID, 0x0061, USB_CLASS_COMM,
+				      USB_CDC_SUBCLASS_ETHERNET,
+				      USB_CDC_PROTO_NONE),
+	.driver_info = (unsigned long)&wwan_info,
+}, {
 	USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET,
 			USB_CDC_PROTO_NONE),
 	.driver_info = (unsigned long) &cdc_info,
-- 
2.7.4

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

* Re: [PATCH] cdc_ether: flag the Cinterion PLS8 modem by gemalto as WWAN
  2018-02-27 11:49 [PATCH] cdc_ether: flag the Cinterion PLS8 modem by gemalto as WWAN Bassem Boubaker
@ 2018-02-27 12:29 ` Bjørn Mork
  2018-02-27 12:43   ` Oliver Neukum
  2018-02-27 13:04 ` Bassem Boubaker
  1 sibling, 1 reply; 6+ messages in thread
From: Bjørn Mork @ 2018-02-27 12:29 UTC (permalink / raw)
  To: Bassem Boubaker; +Cc: linux-kernel, Oliver Neukum, linux-usb, netdev

Bassem Boubaker <bassem.boubaker@actia.fr> writes:

> +#define GEMALTO_VENDOR_ID	0x1e2d

This is defined as CINTERION_VENDOR_ID in drivers/usb/serial/option.c.

I have no idea which defintion is most correct, but I believe the macros
should be kept identical whatever you decide. Anything else is just
unnecessarily confusing.

IMHO the company name tracking macros have grown beyond useful a long
time ago. They just make it harder to grep for the IDs without adding
any useful information whatsoever. And because you have cases like this
where the same number end up having different names, they sometimes hide
information which a plain number would have revealed.



Bjørn

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

* Re: [PATCH] cdc_ether: flag the Cinterion PLS8 modem by gemalto as WWAN
  2018-02-27 12:29 ` Bjørn Mork
@ 2018-02-27 12:43   ` Oliver Neukum
  0 siblings, 0 replies; 6+ messages in thread
From: Oliver Neukum @ 2018-02-27 12:43 UTC (permalink / raw)
  To: Bjørn Mork, Bassem Boubaker; +Cc: linux-kernel, linux-usb, netdev

Am Dienstag, den 27.02.2018, 13:29 +0100 schrieb Bjørn Mork :
> Bassem Boubaker <bassem.boubaker@actia.fr> writes:
> 
> > 
> > +#define GEMALTO_VENDOR_ID	0x1e2d
> 
> This is defined as CINTERION_VENDOR_ID in drivers/usb/serial/option.c.
> 
> I have no idea which defintion is most correct, but I believe the macros
> should be kept identical whatever you decide. Anything else is just
> unnecessarily confusing.
> 
> IMHO the company name tracking macros have grown beyond useful a long
> time ago. They just make it harder to grep for the IDs without adding
> any useful information whatsoever. And because you have cases like this
> where the same number end up having different names, they sometimes hide
> information which a plain number would have revealed.

Hi,

I concur. Could you redo the patch and just use a plain number?

	Regards
		Oliver

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

* [PATCH] cdc_ether: flag the Cinterion PLS8 modem by gemalto as WWAN
  2018-02-27 11:49 [PATCH] cdc_ether: flag the Cinterion PLS8 modem by gemalto as WWAN Bassem Boubaker
  2018-02-27 12:29 ` Bjørn Mork
@ 2018-02-27 13:04 ` Bassem Boubaker
  2018-02-27 13:11   ` Oliver Neukum
  2018-02-27 19:44   ` David Miller
  1 sibling, 2 replies; 6+ messages in thread
From: Bassem Boubaker @ 2018-02-27 13:04 UTC (permalink / raw)
  To: oliver; +Cc: bassem.boubaker, linux-usb, netdev, linux-kernel

    The Cinterion PL8 is an LTE modem with 2 possible WWAN interfaces.

    The modem is  controlled via AT commands through the exposed TTYs.

    AT^SWWAN write command can be used to activate or deactivate a WWAN
    connection for a PDP context defined with AT+CGDCONT. UE supports
    two WWAN adapter. Both WWAN adapters can be activated a the same time

Signed-off-by: Bassem Boubaker <bassem.boubaker@actia.fr>
---
 drivers/net/usb/cdc_ether.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 05dca3e..fff4b13 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -896,6 +896,12 @@ static const struct usb_device_id	products[] = {
 				      USB_CDC_PROTO_NONE),
 	.driver_info = (unsigned long)&wwan_info,
 }, {
+	/* Cinterion PLS8 modem by GEMALTO */
+	USB_DEVICE_AND_INTERFACE_INFO(0x1e2d, 0x0061, USB_CLASS_COMM,
+				      USB_CDC_SUBCLASS_ETHERNET,
+				      USB_CDC_PROTO_NONE),
+	.driver_info = (unsigned long)&wwan_info,
+}, {
 	USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET,
 			USB_CDC_PROTO_NONE),
 	.driver_info = (unsigned long) &cdc_info,
-- 
2.7.4

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

* Re: [PATCH] cdc_ether: flag the Cinterion PLS8 modem by gemalto as WWAN
  2018-02-27 13:04 ` Bassem Boubaker
@ 2018-02-27 13:11   ` Oliver Neukum
  2018-02-27 19:44   ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: Oliver Neukum @ 2018-02-27 13:11 UTC (permalink / raw)
  To: Bassem Boubaker; +Cc: linux-kernel, linux-usb, netdev

Am Dienstag, den 27.02.2018, 14:04 +0100 schrieb Bassem Boubaker:
>     The Cinterion PL8 is an LTE modem with 2 possible WWAN interfaces.
> 
>     The modem is  controlled via AT commands through the exposed TTYs.
> 
>     AT^SWWAN write command can be used to activate or deactivate a WWAN
>     connection for a PDP context defined with AT+CGDCONT. UE supports
>     two WWAN adapter. Both WWAN adapters can be activated a the same time
> 
> Signed-off-by: Bassem Boubaker <bassem.boubaker@actia.fr>
Acked-by: Oliver Neukum <oneukum@suse.com>

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

* Re: [PATCH] cdc_ether: flag the Cinterion PLS8 modem by gemalto as WWAN
  2018-02-27 13:04 ` Bassem Boubaker
  2018-02-27 13:11   ` Oliver Neukum
@ 2018-02-27 19:44   ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2018-02-27 19:44 UTC (permalink / raw)
  To: bassem.boubaker; +Cc: oliver, linux-usb, netdev, linux-kernel

From: Bassem Boubaker <bassem.boubaker@actia.fr>
Date: Tue, 27 Feb 2018 14:04:44 +0100

>     The Cinterion PL8 is an LTE modem with 2 possible WWAN interfaces.
> 
>     The modem is  controlled via AT commands through the exposed TTYs.
> 
>     AT^SWWAN write command can be used to activate or deactivate a WWAN
>     connection for a PDP context defined with AT+CGDCONT. UE supports
>     two WWAN adapter. Both WWAN adapters can be activated a the same time
> 
> Signed-off-by: Bassem Boubaker <bassem.boubaker@actia.fr>

Applied, thanks.

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

end of thread, other threads:[~2018-02-27 19:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-27 11:49 [PATCH] cdc_ether: flag the Cinterion PLS8 modem by gemalto as WWAN Bassem Boubaker
2018-02-27 12:29 ` Bjørn Mork
2018-02-27 12:43   ` Oliver Neukum
2018-02-27 13:04 ` Bassem Boubaker
2018-02-27 13:11   ` Oliver Neukum
2018-02-27 19:44   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).