diff options
| author | Olof Johansson <olof@lixom.net> | 2013-02-04 22:56:41 -0800 | 
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2013-02-04 22:56:41 -0800 | 
| commit | 469da62096e23adc755c1268b00b5fc7a214151b (patch) | |
| tree | fefd055fdae584e38d551f44d1339eb22cee4ed9 /drivers/net/usb/cdc_ncm.c | |
| parent | 4227961650884a06757f80877d5dce0bddc723d4 (diff) | |
| parent | 88b62b915b0b7e25870eb0604ed9a92ba4bfc9f7 (diff) | |
| download | olio-linux-3.10-469da62096e23adc755c1268b00b5fc7a214151b.tar.xz olio-linux-3.10-469da62096e23adc755c1268b00b5fc7a214151b.zip  | |
Merge tag 'v3.8-rc6' into next/soc
Linux 3.8-rc6
Diffstat (limited to 'drivers/net/usb/cdc_ncm.c')
| -rw-r--r-- | drivers/net/usb/cdc_ncm.c | 31 | 
1 files changed, 30 insertions, 1 deletions
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 71b6e92b8e9..9197b2c72ca 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c @@ -435,6 +435,13 @@ advance:  		len -= temp;  	} +	/* some buggy devices have an IAD but no CDC Union */ +	if (!ctx->union_desc && intf->intf_assoc && intf->intf_assoc->bInterfaceCount == 2) { +		ctx->control = intf; +		ctx->data = usb_ifnum_to_if(dev->udev, intf->cur_altsetting->desc.bInterfaceNumber + 1); +		dev_dbg(&intf->dev, "CDC Union missing - got slave from IAD\n"); +	} +  	/* check if we got everything */  	if ((ctx->control == NULL) || (ctx->data == NULL) ||  	    ((!ctx->mbim_desc) && ((ctx->ether_desc == NULL) || (ctx->control != intf)))) @@ -497,7 +504,8 @@ advance:  error2:  	usb_set_intfdata(ctx->control, NULL);  	usb_set_intfdata(ctx->data, NULL); -	usb_driver_release_interface(driver, ctx->data); +	if (ctx->data != ctx->control) +		usb_driver_release_interface(driver, ctx->data);  error:  	cdc_ncm_free((struct cdc_ncm_ctx *)dev->data[0]);  	dev->data[0] = 0; @@ -1155,6 +1163,20 @@ static const struct driver_info wwan_info = {  	.tx_fixup = cdc_ncm_tx_fixup,  }; +/* Same as wwan_info, but with FLAG_NOARP  */ +static const struct driver_info wwan_noarp_info = { +	.description = "Mobile Broadband Network Device (NO ARP)", +	.flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT | FLAG_MULTI_PACKET +			| FLAG_WWAN | FLAG_NOARP, +	.bind = cdc_ncm_bind, +	.unbind = cdc_ncm_unbind, +	.check_connect = cdc_ncm_check_connect, +	.manage_power = usbnet_manage_power, +	.status = cdc_ncm_status, +	.rx_fixup = cdc_ncm_rx_fixup, +	.tx_fixup = cdc_ncm_tx_fixup, +}; +  static const struct usb_device_id cdc_devs[] = {  	/* Ericsson MBM devices like F5521gw */  	{ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO @@ -1194,6 +1216,13 @@ static const struct usb_device_id cdc_devs[] = {  	  .driver_info = (unsigned long)&wwan_info,  	}, +	/* Infineon(now Intel) HSPA Modem platform */ +	{ USB_DEVICE_AND_INTERFACE_INFO(0x1519, 0x0443, +		USB_CLASS_COMM, +		USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE), +	  .driver_info = (unsigned long)&wwan_noarp_info, +	}, +  	/* Generic CDC-NCM devices */  	{ USB_INTERFACE_INFO(USB_CLASS_COMM,  		USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE),  |