diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/usb/qmi_wwan.c | 82 |
1 files changed, 81 insertions, 1 deletions
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index a61c7a1aff8b..e14479dd2438 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c | |||
@@ -243,6 +243,29 @@ err: | |||
243 | return rv; | 243 | return rv; |
244 | } | 244 | } |
245 | 245 | ||
246 | /* Gobi devices uses identical class/protocol codes for all interfaces regardless | ||
247 | * of function. Some of these are CDC ACM like and have the exact same endpoints | ||
248 | * we are looking for. This leaves two possible strategies for identifying the | ||
249 | * correct interface: | ||
250 | * a) hardcoding interface number, or | ||
251 | * b) use the fact that the wwan interface is the only one lacking additional | ||
252 | * (CDC functional) descriptors | ||
253 | * | ||
254 | * Let's see if we can get away with the generic b) solution. | ||
255 | */ | ||
256 | static int qmi_wwan_bind_gobi(struct usbnet *dev, struct usb_interface *intf) | ||
257 | { | ||
258 | int rv = -EINVAL; | ||
259 | |||
260 | /* ignore any interface with additional descriptors */ | ||
261 | if (intf->cur_altsetting->extralen) | ||
262 | goto err; | ||
263 | |||
264 | rv = qmi_wwan_bind_shared(dev, intf); | ||
265 | err: | ||
266 | return rv; | ||
267 | } | ||
268 | |||
246 | static void qmi_wwan_unbind_shared(struct usbnet *dev, struct usb_interface *intf) | 269 | static void qmi_wwan_unbind_shared(struct usbnet *dev, struct usb_interface *intf) |
247 | { | 270 | { |
248 | struct usb_driver *subdriver = (void *)dev->data[0]; | 271 | struct usb_driver *subdriver = (void *)dev->data[0]; |
@@ -310,7 +333,18 @@ static const struct driver_info qmi_wwan_shared = { | |||
310 | .manage_power = qmi_wwan_manage_power, | 333 | .manage_power = qmi_wwan_manage_power, |
311 | }; | 334 | }; |
312 | 335 | ||
336 | static const struct driver_info qmi_wwan_gobi = { | ||
337 | .description = "Qualcomm Gobi wwan/QMI device", | ||
338 | .flags = FLAG_WWAN, | ||
339 | .bind = qmi_wwan_bind_gobi, | ||
340 | .unbind = qmi_wwan_unbind_shared, | ||
341 | .manage_power = qmi_wwan_manage_power, | ||
342 | }; | ||
343 | |||
313 | #define HUAWEI_VENDOR_ID 0x12D1 | 344 | #define HUAWEI_VENDOR_ID 0x12D1 |
345 | #define QMI_GOBI_DEVICE(vend, prod) \ | ||
346 | USB_DEVICE(vend, prod), \ | ||
347 | .driver_info = (unsigned long)&qmi_wwan_gobi | ||
314 | 348 | ||
315 | static const struct usb_device_id products[] = { | 349 | static const struct usb_device_id products[] = { |
316 | { /* Huawei E392, E398 and possibly others sharing both device id and more... */ | 350 | { /* Huawei E392, E398 and possibly others sharing both device id and more... */ |
@@ -332,7 +366,53 @@ static const struct usb_device_id products[] = { | |||
332 | .bInterfaceProtocol = 17, | 366 | .bInterfaceProtocol = 17, |
333 | .driver_info = (unsigned long)&qmi_wwan_shared, | 367 | .driver_info = (unsigned long)&qmi_wwan_shared, |
334 | }, | 368 | }, |
335 | { } /* END */ | 369 | { /* Pantech UML290 */ |
370 | .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO, | ||
371 | .idVendor = 0x106c, | ||
372 | .idProduct = 0x3718, | ||
373 | .bInterfaceClass = 0xff, | ||
374 | .bInterfaceSubClass = 0xf0, | ||
375 | .bInterfaceProtocol = 0xff, | ||
376 | .driver_info = (unsigned long)&qmi_wwan_shared, | ||
377 | }, | ||
378 | {QMI_GOBI_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */ | ||
379 | {QMI_GOBI_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */ | ||
380 | {QMI_GOBI_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */ | ||
381 | {QMI_GOBI_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */ | ||
382 | {QMI_GOBI_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */ | ||
383 | {QMI_GOBI_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */ | ||
384 | {QMI_GOBI_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */ | ||
385 | {QMI_GOBI_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */ | ||
386 | {QMI_GOBI_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */ | ||
387 | {QMI_GOBI_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */ | ||
388 | {QMI_GOBI_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */ | ||
389 | {QMI_GOBI_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */ | ||
390 | {QMI_GOBI_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */ | ||
391 | {QMI_GOBI_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */ | ||
392 | {QMI_GOBI_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */ | ||
393 | {QMI_GOBI_DEVICE(0x05c6, 0x920b)}, /* Generic Gobi 2000 Modem device */ | ||
394 | {QMI_GOBI_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */ | ||
395 | {QMI_GOBI_DEVICE(0x05c6, 0x9245)}, /* Samsung Gobi 2000 Modem device (VL176) */ | ||
396 | {QMI_GOBI_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem device (VP412) */ | ||
397 | {QMI_GOBI_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */ | ||
398 | {QMI_GOBI_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) */ | ||
399 | {QMI_GOBI_DEVICE(0x05c6, 0x9235)}, /* Top Global Gobi 2000 Modem device (VR306) */ | ||
400 | {QMI_GOBI_DEVICE(0x05c6, 0x9275)}, /* iRex Technologies Gobi 2000 Modem device (VR307) */ | ||
401 | {QMI_GOBI_DEVICE(0x1199, 0x9001)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ | ||
402 | {QMI_GOBI_DEVICE(0x1199, 0x9002)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ | ||
403 | {QMI_GOBI_DEVICE(0x1199, 0x9003)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ | ||
404 | {QMI_GOBI_DEVICE(0x1199, 0x9004)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ | ||
405 | {QMI_GOBI_DEVICE(0x1199, 0x9005)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ | ||
406 | {QMI_GOBI_DEVICE(0x1199, 0x9006)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ | ||
407 | {QMI_GOBI_DEVICE(0x1199, 0x9007)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ | ||
408 | {QMI_GOBI_DEVICE(0x1199, 0x9008)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ | ||
409 | {QMI_GOBI_DEVICE(0x1199, 0x9009)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ | ||
410 | {QMI_GOBI_DEVICE(0x1199, 0x900a)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ | ||
411 | {QMI_GOBI_DEVICE(0x1199, 0x9011)}, /* Sierra Wireless Gobi 2000 Modem device (MC8305) */ | ||
412 | {QMI_GOBI_DEVICE(0x16d8, 0x8002)}, /* CMDTech Gobi 2000 Modem device (VU922) */ | ||
413 | {QMI_GOBI_DEVICE(0x05c6, 0x9205)}, /* Gobi 2000 Modem device */ | ||
414 | {QMI_GOBI_DEVICE(0x1199, 0x9013)}, /* Sierra Wireless Gobi 3000 Modem device (MC8355) */ | ||
415 | { } /* END */ | ||
336 | }; | 416 | }; |
337 | MODULE_DEVICE_TABLE(usb, products); | 417 | MODULE_DEVICE_TABLE(usb, products); |
338 | 418 | ||