Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 335743
b: refs/heads/master
c: bbc8d92
h: refs/heads/master
i:
  335741: 195bf66
  335739: beb3494
  335735: 2fb1ae1
  335727: e12e58d
  335711: 6343461
  335679: ef8e4b1
  335615: fc0bd36
v: v3
  • Loading branch information
Bjørn Mork authored and David S. Miller committed Nov 13, 2012
1 parent c5ee6c9 commit 953cdb3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7702745b15128e5f0659693736a864e35be1c807
refs/heads/master: bbc8d9228ea8e37ce29fa96150d10b85a2c7be60
22 changes: 18 additions & 4 deletions trunk/drivers/net/usb/cdc_ncm.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,12 @@ static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf)
(ctx->ether_desc == NULL) || (ctx->control != intf))
goto error;

/* claim interfaces, if any */
temp = usb_driver_claim_interface(driver, ctx->data, dev);
if (temp)
goto error;
/* claim data interface, if different from control */
if (ctx->data != ctx->control) {
temp = usb_driver_claim_interface(driver, ctx->data, dev);
if (temp)
goto error;
}

iface_no = ctx->data->cur_altsetting->desc.bInterfaceNumber;

Expand Down Expand Up @@ -623,6 +625,10 @@ static void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf)

tasklet_kill(&ctx->bh);

/* handle devices with combined control and data interface */
if (ctx->control == ctx->data)
ctx->data = NULL;

/* disconnect master --> disconnect slave */
if (intf == ctx->control && ctx->data) {
usb_set_intfdata(ctx->data, NULL);
Expand Down Expand Up @@ -1245,6 +1251,14 @@ static const struct usb_device_id cdc_devs[] = {
.driver_info = (unsigned long) &wwan_info,
},

/* Huawei NCM devices disguised as vendor specific */
{ USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x16),
.driver_info = (unsigned long)&wwan_info,
},
{ USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x46),
.driver_info = (unsigned long)&wwan_info,
},

/* Generic CDC-NCM devices */
{ USB_INTERFACE_INFO(USB_CLASS_COMM,
USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE),
Expand Down

0 comments on commit 953cdb3

Please sign in to comment.