Skip to content

Commit

Permalink
usbnet: add support for some Huawei modems with cdc-ether ports
Browse files Browse the repository at this point in the history
Some newer Huawei devices (T-Mobile Rocket, others) have cdc-ether
compatible ports, so recognize and expose them.

Signed-off-by: Dan Williams <[email protected]>
Acked-by: Oliver Neukum <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
dcbw authored and davem330 committed Apr 29, 2011
1 parent 8333a46 commit b3c914a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions drivers/net/usb/cdc_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ static const struct driver_info cdc_info = {
.manage_power = cdc_manage_power,
};

static const struct driver_info mbm_info = {
static const struct driver_info wwan_info = {
.description = "Mobile Broadband Network Device",
.flags = FLAG_WWAN,
.bind = usbnet_cdc_bind,
Expand All @@ -471,6 +471,7 @@ static const struct driver_info mbm_info = {

/*-------------------------------------------------------------------------*/

#define HUAWEI_VENDOR_ID 0x12D1

static const struct usb_device_id products [] = {
/*
Expand Down Expand Up @@ -587,8 +588,17 @@ static const struct usb_device_id products [] = {
}, {
USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM,
USB_CDC_PROTO_NONE),
.driver_info = (unsigned long)&mbm_info,
.driver_info = (unsigned long)&wwan_info,

}, {
/* Various Huawei modems with a network port like the UMG1831 */
.match_flags = USB_DEVICE_ID_MATCH_VENDOR
| USB_DEVICE_ID_MATCH_INT_INFO,
.idVendor = HUAWEI_VENDOR_ID,
.bInterfaceClass = USB_CLASS_COMM,
.bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET,
.bInterfaceProtocol = 255,
.driver_info = (unsigned long)&wwan_info,
},
{ }, // END
};
Expand Down

0 comments on commit b3c914a

Please sign in to comment.