netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] USB CDC-Ether - Add ZTE WWAN matches before generic Ethernet
@ 2012-05-19 13:56 Andrew Bird
  2012-05-19 17:30 ` Bjørn Mork
  2012-05-19 22:48 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Bird @ 2012-05-19 13:56 UTC (permalink / raw)
  To: oliver; +Cc: gregkh, linux-usb, netdev, linux-kernel, Andrew Bird

Some ZTE WWAN devices have generic CDC Ether descriptors. Add those
into the whitelist so that we get FLAG_WWAN on the interface

Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>
---
 drivers/net/usb/cdc_ether.c |   56 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 425e201..fffee6a 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -486,6 +486,7 @@ static const struct driver_info wwan_info = {
 
 #define HUAWEI_VENDOR_ID	0x12D1
 #define NOVATEL_VENDOR_ID	0x1410
+#define ZTE_VENDOR_ID		0x19D2
 
 static const struct usb_device_id	products [] = {
 /*
@@ -618,6 +619,61 @@ static const struct usb_device_id	products [] = {
 	.bInterfaceProtocol	= USB_CDC_PROTO_NONE,
 	.driver_info = (unsigned long)&wwan_info,
 }, {
+	/* ZTE (Vodafone) K3805-Z */
+	.match_flags    =   USB_DEVICE_ID_MATCH_VENDOR
+		 | USB_DEVICE_ID_MATCH_PRODUCT
+		 | USB_DEVICE_ID_MATCH_INT_INFO,
+	.idVendor               = ZTE_VENDOR_ID,
+	.idProduct		= 0x1003,
+	.bInterfaceClass	= USB_CLASS_COMM,
+	.bInterfaceSubClass	= USB_CDC_SUBCLASS_ETHERNET,
+	.bInterfaceProtocol	= USB_CDC_PROTO_NONE,
+	.driver_info = (unsigned long)&wwan_info,
+}, {
+	/* ZTE (Vodafone) K3806-Z */
+	.match_flags    =   USB_DEVICE_ID_MATCH_VENDOR
+		 | USB_DEVICE_ID_MATCH_PRODUCT
+		 | USB_DEVICE_ID_MATCH_INT_INFO,
+	.idVendor               = ZTE_VENDOR_ID,
+	.idProduct		= 0x1015,
+	.bInterfaceClass	= USB_CLASS_COMM,
+	.bInterfaceSubClass	= USB_CDC_SUBCLASS_ETHERNET,
+	.bInterfaceProtocol	= USB_CDC_PROTO_NONE,
+	.driver_info = (unsigned long)&wwan_info,
+}, {
+	/* ZTE (Vodafone) K4510-Z */
+	.match_flags    =   USB_DEVICE_ID_MATCH_VENDOR
+		 | USB_DEVICE_ID_MATCH_PRODUCT
+		 | USB_DEVICE_ID_MATCH_INT_INFO,
+	.idVendor               = ZTE_VENDOR_ID,
+	.idProduct		= 0x1173,
+	.bInterfaceClass	= USB_CLASS_COMM,
+	.bInterfaceSubClass	= USB_CDC_SUBCLASS_ETHERNET,
+	.bInterfaceProtocol	= USB_CDC_PROTO_NONE,
+	.driver_info = (unsigned long)&wwan_info,
+}, {
+	/* ZTE (Vodafone) K3770-Z */
+	.match_flags    =   USB_DEVICE_ID_MATCH_VENDOR
+		 | USB_DEVICE_ID_MATCH_PRODUCT
+		 | USB_DEVICE_ID_MATCH_INT_INFO,
+	.idVendor               = ZTE_VENDOR_ID,
+	.idProduct		= 0x1177,
+	.bInterfaceClass	= USB_CLASS_COMM,
+	.bInterfaceSubClass	= USB_CDC_SUBCLASS_ETHERNET,
+	.bInterfaceProtocol	= USB_CDC_PROTO_NONE,
+	.driver_info = (unsigned long)&wwan_info,
+}, {
+	/* ZTE (Vodafone) K3772-Z */
+	.match_flags    =   USB_DEVICE_ID_MATCH_VENDOR
+		 | USB_DEVICE_ID_MATCH_PRODUCT
+		 | USB_DEVICE_ID_MATCH_INT_INFO,
+	.idVendor               = ZTE_VENDOR_ID,
+	.idProduct		= 0x1181,
+	.bInterfaceClass	= USB_CLASS_COMM,
+	.bInterfaceSubClass	= USB_CDC_SUBCLASS_ETHERNET,
+	.bInterfaceProtocol	= 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,
-- 
1.7.6.5

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

* Re: [PATCH] USB CDC-Ether - Add ZTE WWAN matches before generic Ethernet
  2012-05-19 13:56 [PATCH] USB CDC-Ether - Add ZTE WWAN matches before generic Ethernet Andrew Bird
@ 2012-05-19 17:30 ` Bjørn Mork
  2012-05-19 17:42   ` Andrew Bird (Sphere Systems)
  2012-05-19 22:48 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Bjørn Mork @ 2012-05-19 17:30 UTC (permalink / raw)
  To: Andrew Bird; +Cc: oliver, gregkh, linux-usb, netdev, linux-kernel

Andrew Bird <ajb@spheresystems.co.uk> writes:

> Some ZTE WWAN devices have generic CDC Ether descriptors. Add those
> into the whitelist so that we get FLAG_WWAN on the interface

Are you sure none of these export QMI via the CDC Ether control
interface?  Or are they not Qualcomm devices at all?

As usual, if you see a spurious "CDC: unexpected notification 01" logged
from cdc_ether, then there is reason to examine those closer.  If you
don't see any such messages, then there isn't any QMI there.


Bjørn

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

* Re: [PATCH] USB CDC-Ether - Add ZTE WWAN matches before generic Ethernet
  2012-05-19 17:30 ` Bjørn Mork
@ 2012-05-19 17:42   ` Andrew Bird (Sphere Systems)
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Bird (Sphere Systems) @ 2012-05-19 17:42 UTC (permalink / raw)
  To: Bjørn Mork; +Cc: oliver, gregkh, linux-usb, netdev, linux-kernel

On Saturday 19 May 2012, Bjørn Mork wrote:
> Andrew Bird <ajb@spheresystems.co.uk> writes:
> > Some ZTE WWAN devices have generic CDC Ether descriptors. Add those
> > into the whitelist so that we get FLAG_WWAN on the interface
> 
> Are you sure none of these export QMI via the CDC Ether control
> interface?  Or are they not Qualcomm devices at all?
> 
> As usual, if you see a spurious "CDC: unexpected notification 01" logged
> from cdc_ether, then there is reason to examine those closer.  If you
> don't see any such messages, then there isn't any QMI there.
> 
> 
> Bjørn

Hi Bjørn,
	No these are devices that use the Icera chipset. They have cdc-acm serial 
ports and firmware has implemented AT commands for (de)activating the pseudo 
Ethernet and getting IP + DNS values etc. Actually applying this patch will 
provide little in terms of operation except to make the interface name wwan%d 
unstead of usb%d and to flag the interface such that Network Manager does not 
try to bring it up via DHCP as soon as it appears, like it would with a fixed 
Ethernet interface.

Good tip about the 'unexpected notification 01' I'll look out for that!

Andrew

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

* Re: [PATCH] USB CDC-Ether - Add ZTE WWAN matches before generic Ethernet
  2012-05-19 13:56 [PATCH] USB CDC-Ether - Add ZTE WWAN matches before generic Ethernet Andrew Bird
  2012-05-19 17:30 ` Bjørn Mork
@ 2012-05-19 22:48 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2012-05-19 22:48 UTC (permalink / raw)
  To: ajb; +Cc: oliver, gregkh, linux-usb, netdev, linux-kernel

From: Andrew Bird <ajb@spheresystems.co.uk>
Date: Sat, 19 May 2012 14:56:07 +0100

> Some ZTE WWAN devices have generic CDC Ether descriptors. Add those
> into the whitelist so that we get FLAG_WWAN on the interface
> 
> Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>

Applied.

But I changed the Subject line to have a more appropriate prefix,
namely "net: cdc_ether: "

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

end of thread, other threads:[~2012-05-19 22:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-19 13:56 [PATCH] USB CDC-Ether - Add ZTE WWAN matches before generic Ethernet Andrew Bird
2012-05-19 17:30 ` Bjørn Mork
2012-05-19 17:42   ` Andrew Bird (Sphere Systems)
2012-05-19 22:48 ` 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).