diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-06-02 01:13:34 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-06-02 01:13:34 -0700 |
| commit | fd95dadf54bf08e910a4cad0bbce8d25e8813429 (patch) | |
| tree | 7824cada0e10c6bb934c59b3b8a3aeb09b1e812f /drivers/net/usb/qmi_wwan.c | |
| parent | 33b2567cd52c95ad3b33578aaa200d53aa4d4dbc (diff) | |
| parent | 9848856fe15cdad6b64b5883bb4c30528b358f7d (diff) | |
Merge "Merge android-4.4.133 (3f51ea2) into msm-4.4"
Diffstat (limited to 'drivers/net/usb/qmi_wwan.c')
| -rw-r--r-- | drivers/net/usb/qmi_wwan.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index a6f0a8f516d6..8aaa09b3c753 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -855,6 +855,18 @@ static int qmi_wwan_probe(struct usb_interface *intf, id->driver_info = (unsigned long)&qmi_wwan_info; } + /* There are devices where the same interface number can be + * configured as different functions. We should only bind to + * vendor specific functions when matching on interface number + */ + if (id->match_flags & USB_DEVICE_ID_MATCH_INT_NUMBER && + desc->bInterfaceClass != USB_CLASS_VENDOR_SPEC) { + dev_dbg(&intf->dev, + "Rejecting interface number match for class %02x\n", + desc->bInterfaceClass); + return -ENODEV; + } + /* Quectel EC20 quirk where we've QMI on interface 4 instead of 0 */ if (quectel_ec20_detected(intf) && desc->bInterfaceNumber == 0) { dev_dbg(&intf->dev, "Quectel EC20 quirk, skipping interface 0\n"); |
