aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/cdc_ncm.h
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2014-05-11 10:47:15 +0200
committerDavid S. Miller <davem@davemloft.net>2014-05-13 17:46:09 -0400
commit50a0ffaf75e9d2d97200b523f2c600f40e9756b1 (patch)
tree6ffcf988584c3725a7e146afae06e9cd11ac2355 /include/linux/usb/cdc_ncm.h
parentnet: cdc_mbim: add driver documentation (diff)
downloadlinux-dev-50a0ffaf75e9d2d97200b523f2c600f40e9756b1.tar.xz
linux-dev-50a0ffaf75e9d2d97200b523f2c600f40e9756b1.zip
net: cdc_ncm/cdc_mbim: rework probing of NCM/MBIM functions
The NCM class match in the cdc_mbim driver is confusing and cause unexpected behaviour. The USB core guarantees that a USB interface is in altsetting 0 when probing starts. This means that devices implementing a NCM 1.0 backwards compatible MBIM function (a "NCM/MBIM function") always hit the NCM entry in the cdc_mbim driver match table. Such functions will never match any of the MBIM entries. This causes unexpeced behaviour for cases where the NCM and MBIM entries are differet, which is currently the case for all except Ericsson devices. Improve the probing of NCM/MBIM functions by looking up the device again in the cdc_mbim match table after switching to the MBIM identity. The shared altsetting selection is updated to better accommodate the new probing logic, returning the preferred altsetting for the control interface instead of the data interface. The control interface altsetting update is moved to the cdc_mbim driver. It is never necessary to change the control interface altsetting for NCM. Cc: Greg Suarez <gsuarez@smithmicro.com> Reported by: Yu-an Shih <yshih@nvidia.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/usb/cdc_ncm.h')
-rw-r--r--include/linux/usb/cdc_ncm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h
index 44b38b92236a..55b6feead93b 100644
--- a/include/linux/usb/cdc_ncm.h
+++ b/include/linux/usb/cdc_ncm.h
@@ -121,7 +121,7 @@ struct cdc_ncm_ctx {
u16 connected;
};
-u8 cdc_ncm_select_altsetting(struct usbnet *dev, struct usb_interface *intf);
+u8 cdc_ncm_select_altsetting(struct usb_interface *intf);
int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting);
void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf);
struct sk_buff *cdc_ncm_fill_tx_frame(struct usbnet *dev, struct sk_buff *skb, __le32 sign);