diff mbox series

cdc_ether: flag the Cinterion PLS8 modem by gemalto as WWAN

Message ID 1519732192-29332-1-git-send-email-bassem.boubaker@actia.fr
State Changes Requested, archived
Delegated to: David Miller
Headers show
Series cdc_ether: flag the Cinterion PLS8 modem by gemalto as WWAN | expand

Commit Message

Bassem Boubaker Feb. 27, 2018, 11:49 a.m. UTC
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(+)

Comments

Bjørn Mork Feb. 27, 2018, 12:29 p.m. UTC | #1
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
Oliver Neukum Feb. 27, 2018, 12:43 p.m. UTC | #2
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
diff mbox series

Patch

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,