Skip to content

Commit fec67b4

Browse files
bmorkgregkh
authored andcommitted
usb: cdc-wdm: Add device-id for Huawei 3G/LTE modems
[v2: Editorial changes suggested by Sergei Shtylyov] These modems use the Qualcomm MSM Interface (QMI) protocol for management of their CDC ECM like wwan interface. This driver is perfect for exporting the protocol to userspace. The created character device will be indistinguishable from a common AT command based Device Management interface, so userspace applications must do some intelligent matching on the USB device. Cc: Sergei Shtylyov <[email protected]> Signed-off-by: Bjørn Mork <[email protected]> Acked-by: Oliver Neukum <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f30cdbc commit fec67b4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

drivers/usb/class/cdc-wdm.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,29 @@
3131
#define DRIVER_AUTHOR "Oliver Neukum"
3232
#define DRIVER_DESC "USB Abstract Control Model driver for USB WCM Device Management"
3333

34+
#define HUAWEI_VENDOR_ID 0x12D1
35+
3436
static const struct usb_device_id wdm_ids[] = {
3537
{
3638
.match_flags = USB_DEVICE_ID_MATCH_INT_CLASS |
3739
USB_DEVICE_ID_MATCH_INT_SUBCLASS,
3840
.bInterfaceClass = USB_CLASS_COMM,
3941
.bInterfaceSubClass = USB_CDC_SUBCLASS_DMM
4042
},
43+
{
44+
/*
45+
* Huawei E392, E398 and possibly other Qualcomm based modems
46+
* embed the Qualcomm QMI protocol inside CDC on CDC ECM like
47+
* control interfaces. Userspace access to this is required
48+
* to configure the accompanying data interface
49+
*/
50+
.match_flags = USB_DEVICE_ID_MATCH_VENDOR |
51+
USB_DEVICE_ID_MATCH_INT_INFO,
52+
.idVendor = HUAWEI_VENDOR_ID,
53+
.bInterfaceClass = USB_CLASS_VENDOR_SPEC,
54+
.bInterfaceSubClass = 1,
55+
.bInterfaceProtocol = 9, /* NOTE: CDC ECM control interface! */
56+
},
4157
{ }
4258
};
4359

0 commit comments

Comments
 (0)