Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340445
b: refs/heads/master
c: bd329e1
h: refs/heads/master
i:
  340443: aec6235
v: v3
  • Loading branch information
Bjørn Mork authored and David S. Miller committed Oct 23, 2012
1 parent 4cfa6ba commit 5c7d849
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9084ccf9f7f96302bdcbd5d7707e3ec8b8e1bf53
refs/heads/master: bd329e1284bc5fa6adaddd2ee9ca15328749a7a6
27 changes: 27 additions & 0 deletions trunk/drivers/net/usb/cdc_ncm.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,33 @@ static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf)
{
int ret;

/* The MBIM spec defines a NCM compatible default altsetting,
* which we may have matched:
*
* "Functions that implement both NCM 1.0 and MBIM (an
* “NCM/MBIM function”) according to this recommendation
* shall provide two alternate settings for the
* Communication Interface. Alternate setting 0, and the
* associated class and endpoint descriptors, shall be
* constructed according to the rules given for the
* Communication Interface in section 5 of [USBNCM10].
* Alternate setting 1, and the associated class and
* endpoint descriptors, shall be constructed according to
* the rules given in section 6 (USB Device Model) of this
* specification."
*
* Do not bind to such interfaces, allowing cdc_mbim to handle
* them
*/
#if IS_ENABLED(CONFIG_USB_NET_CDC_MBIM)
if ((intf->num_altsetting == 2) &&
!usb_set_interface(dev->udev,
intf->cur_altsetting->desc.bInterfaceNumber,
CDC_NCM_COMM_ALTSETTING_MBIM) &&
cdc_ncm_comm_intf_is_mbim(intf->cur_altsetting))
return -ENODEV;
#endif

/* NCM data altsetting is always 1 */
ret = cdc_ncm_bind_common(dev, intf, 1);

Expand Down

0 comments on commit 5c7d849

Please sign in to comment.