--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
-@@ -825,6 +825,7 @@ static const struct usb_device_id produc
+@@ -836,6 +836,7 @@ static const struct usb_device_id produc
{QMI_GOBI_DEVICE(0x05c6, 0x9245)}, /* Samsung Gobi 2000 Modem device (VL176) */
{QMI_GOBI_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem device (VP412) */
{QMI_GOBI_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */
{QMI_GOBI_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) */
{QMI_GOBI_DEVICE(0x05c6, 0x9235)}, /* Top Global Gobi 2000 Modem device (VR306) */
{QMI_GOBI_DEVICE(0x05c6, 0x9275)}, /* iRex Technologies Gobi 2000 Modem device (VR307) */
-@@ -856,10 +857,24 @@ static const struct usb_device_id produc
+@@ -867,6 +868,19 @@ static const struct usb_device_id produc
};
MODULE_DEVICE_TABLE(usb, products);
+ struct usb_device *dev = interface_to_usbdev(intf);
+
+ if (dev->actconfig &&
-+ le16_to_cpu(dev->descriptor.idVendor) == 0x05c6 &&
-+ le16_to_cpu(dev->descriptor.idProduct) == 0x9215 &&
-+ dev->actconfig->desc.bNumInterfaces == 5)
++ le16_to_cpu(dev->descriptor.idVendor) == 0x05c6 &&
++ le16_to_cpu(dev->descriptor.idProduct) == 0x9215 &&
++ dev->actconfig->desc.bNumInterfaces == 5)
+ return true;
+
+ return false;
static int qmi_wwan_probe(struct usb_interface *intf,
const struct usb_device_id *prod)
{
- struct usb_device_id *id = (struct usb_device_id *)prod;
-+ struct usb_interface_descriptor *desc = &intf->cur_altsetting->desc;
-
- /* Workaround to enable dynamic IDs. This disables usbnet
- * blacklisting functionality. Which, if required, can be
-@@ -871,6 +886,12 @@ static int qmi_wwan_probe(struct usb_int
- id->driver_info = (unsigned long)&qmi_wwan_info;
+@@ -895,6 +909,12 @@ static int qmi_wwan_probe(struct usb_int
+ return -ENODEV;
}
+ /* Quectel EC20 quirk where we've QMI on interface 4 instead of 0 */