2 * Copyright (c) 2012 Bjørn Mork <bjorn@mork.no>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * version 2 as published by the Free Software Foundation.
9 #include <linux/module.h>
10 #include <linux/netdevice.h>
11 #include <linux/ethtool.h>
12 #include <linux/mii.h>
13 #include <linux/usb.h>
14 #include <linux/usb/cdc.h>
15 #include <linux/usb/usbnet.h>
16 #include <linux/usb/cdc-wdm.h>
18 /* The name of the CDC Device Management driver */
19 #define DM_DRIVER "cdc_wdm"
22 * This driver supports wwan (3G/LTE/?) devices using a vendor
23 * specific management protocol called Qualcomm MSM Interface (QMI) -
24 * in addition to the more common AT commands over serial interface
27 * QMI is wrapped in CDC, using CDC encapsulated commands on the
28 * control ("master") interface of a two-interface CDC Union
29 * resembling standard CDC ECM. The devices do not use the control
30 * interface for any other CDC messages. Most likely because the
31 * management protocol is used in place of the standard CDC
32 * notifications NOTIFY_NETWORK_CONNECTION and NOTIFY_SPEED_CHANGE
34 * Handling a protocol like QMI is out of the scope for any driver.
35 * It can be exported as a character device using the cdc-wdm driver,
36 * which will enable userspace applications ("modem managers") to
37 * handle it. This may be required to use the network interface
38 * provided by the driver.
40 * These devices may alternatively/additionally be configured using AT
41 * commands on any of the serial interfaces driven by the option driver
43 * This driver binds only to the data ("slave") interface to enable
44 * the cdc-wdm driver to bind to the control interface. It still
45 * parses the CDC functional descriptors on the control interface to
46 * a) verify that this is indeed a handled interface (CDC Union
47 * header lists it as slave)
48 * b) get MAC address and other ethernet config from the CDC Ethernet
50 * c) enable user bind requests against the control interface, which
51 * is the common way to bind to CDC Ethernet Control Model type
53 * d) provide a hint to the user about which interface is the
54 * corresponding management interface
57 static int qmi_wwan_bind(struct usbnet
*dev
, struct usb_interface
*intf
)
60 struct usb_interface
*control
= NULL
;
61 u8
*buf
= intf
->cur_altsetting
->extra
;
62 int len
= intf
->cur_altsetting
->extralen
;
63 struct usb_interface_descriptor
*desc
= &intf
->cur_altsetting
->desc
;
64 struct usb_cdc_union_desc
*cdc_union
= NULL
;
65 struct usb_cdc_ether_desc
*cdc_ether
= NULL
;
66 u32 required
= 1 << USB_CDC_HEADER_TYPE
| 1 << USB_CDC_UNION_TYPE
;
68 atomic_t
*pmcount
= (void *)&dev
->data
[1];
70 atomic_set(pmcount
, 0);
73 * assume a data interface has no additional descriptors and
74 * that the control and data interface are numbered
75 * consecutively - this holds for the Huawei device at least
77 if (len
== 0 && desc
->bInterfaceNumber
> 0) {
78 control
= usb_ifnum_to_if(dev
->udev
, desc
->bInterfaceNumber
- 1);
82 buf
= control
->cur_altsetting
->extra
;
83 len
= control
->cur_altsetting
->extralen
;
84 dev_dbg(&intf
->dev
, "guessing \"control\" => %s, \"data\" => this\n",
85 dev_name(&control
->dev
));
89 struct usb_descriptor_header
*h
= (void *)buf
;
91 /* ignore any misplaced descriptors */
92 if (h
->bDescriptorType
!= USB_DT_CS_INTERFACE
)
95 /* buf[2] is CDC descriptor subtype */
97 case USB_CDC_HEADER_TYPE
:
98 if (found
& 1 << USB_CDC_HEADER_TYPE
) {
99 dev_dbg(&intf
->dev
, "extra CDC header\n");
102 if (h
->bLength
!= sizeof(struct usb_cdc_header_desc
)) {
103 dev_dbg(&intf
->dev
, "CDC header len %u\n", h
->bLength
);
107 case USB_CDC_UNION_TYPE
:
108 if (found
& 1 << USB_CDC_UNION_TYPE
) {
109 dev_dbg(&intf
->dev
, "extra CDC union\n");
112 if (h
->bLength
!= sizeof(struct usb_cdc_union_desc
)) {
113 dev_dbg(&intf
->dev
, "CDC union len %u\n", h
->bLength
);
116 cdc_union
= (struct usb_cdc_union_desc
*)buf
;
118 case USB_CDC_ETHERNET_TYPE
:
119 if (found
& 1 << USB_CDC_ETHERNET_TYPE
) {
120 dev_dbg(&intf
->dev
, "extra CDC ether\n");
123 if (h
->bLength
!= sizeof(struct usb_cdc_ether_desc
)) {
124 dev_dbg(&intf
->dev
, "CDC ether len %u\n", h
->bLength
);
127 cdc_ether
= (struct usb_cdc_ether_desc
*)buf
;
132 * Remember which CDC functional descriptors we've seen. Works
133 * for all types we care about, of which USB_CDC_ETHERNET_TYPE
134 * (0x0f) is the highest numbered
137 found
|= 1 << buf
[2];
144 /* did we find all the required ones? */
145 if ((found
& required
) != required
) {
146 dev_err(&intf
->dev
, "CDC functional descriptors missing\n");
150 /* give the user a helpful hint if trying to bind to the wrong interface */
151 if (cdc_union
&& desc
->bInterfaceNumber
== cdc_union
->bMasterInterface0
) {
152 dev_err(&intf
->dev
, "leaving \"control\" interface for " DM_DRIVER
" - try binding to %s instead!\n",
153 dev_name(&usb_ifnum_to_if(dev
->udev
, cdc_union
->bSlaveInterface0
)->dev
));
157 /* errors aren't fatal - we can live with the dynamic address */
159 dev
->hard_mtu
= le16_to_cpu(cdc_ether
->wMaxSegmentSize
);
160 usbnet_get_ethernet_addr(dev
, cdc_ether
->iMACAddress
);
163 /* success! point the user to the management interface */
165 dev_info(&intf
->dev
, "Use \"" DM_DRIVER
"\" for QMI interface %s\n",
166 dev_name(&control
->dev
));
168 /* XXX: add a sysfs symlink somewhere to help management applications find it? */
170 /* collect bulk endpoints now that we know intf == "data" interface */
171 status
= usbnet_get_endpoints(dev
, intf
);
177 /* using a counter to merge subdriver requests with our own into a combined state */
178 static int qmi_wwan_manage_power(struct usbnet
*dev
, int on
)
180 atomic_t
*pmcount
= (void *)&dev
->data
[1];
183 dev_dbg(&dev
->intf
->dev
, "%s() pmcount=%d, on=%d\n", __func__
, atomic_read(pmcount
), on
);
185 if ((on
&& atomic_add_return(1, pmcount
) == 1) || (!on
&& atomic_dec_and_test(pmcount
))) {
186 /* need autopm_get/put here to ensure the usbcore sees the new value */
187 rv
= usb_autopm_get_interface(dev
->intf
);
190 dev
->intf
->needs_remote_wakeup
= on
;
191 usb_autopm_put_interface(dev
->intf
);
197 static int qmi_wwan_cdc_wdm_manage_power(struct usb_interface
*intf
, int on
)
199 struct usbnet
*dev
= usb_get_intfdata(intf
);
200 return qmi_wwan_manage_power(dev
, on
);
203 /* Some devices combine the "control" and "data" functions into a
204 * single interface with all three endpoints: interrupt + bulk in and
207 * Setting up cdc-wdm as a subdriver owning the interrupt endpoint
208 * will let it provide userspace access to the encapsulated QMI
209 * protocol without interfering with the usbnet operations.
211 static int qmi_wwan_bind_shared(struct usbnet
*dev
, struct usb_interface
*intf
)
214 struct usb_driver
*subdriver
= NULL
;
215 atomic_t
*pmcount
= (void *)&dev
->data
[1];
217 /* ZTE makes devices where the interface descriptors and endpoint
218 * configurations of two or more interfaces are identical, even
219 * though the functions are completely different. If set, then
220 * driver_info->data is a bitmap of acceptable interface numbers
221 * allowing us to bind to one such interface without binding to
224 if (dev
->driver_info
->data
&&
225 !test_bit(intf
->cur_altsetting
->desc
.bInterfaceNumber
, &dev
->driver_info
->data
)) {
226 dev_info(&intf
->dev
, "not on our whitelist - ignored");
231 atomic_set(pmcount
, 0);
233 /* collect all three endpoints */
234 rv
= usbnet_get_endpoints(dev
, intf
);
238 /* require interrupt endpoint for subdriver */
244 subdriver
= usb_cdc_wdm_register(intf
, &dev
->status
->desc
, 512, &qmi_wwan_cdc_wdm_manage_power
);
245 if (IS_ERR(subdriver
)) {
246 rv
= PTR_ERR(subdriver
);
250 /* can't let usbnet use the interrupt endpoint */
253 /* save subdriver struct for suspend/resume wrappers */
254 dev
->data
[0] = (unsigned long)subdriver
;
260 static void qmi_wwan_unbind_shared(struct usbnet
*dev
, struct usb_interface
*intf
)
262 struct usb_driver
*subdriver
= (void *)dev
->data
[0];
264 if (subdriver
&& subdriver
->disconnect
)
265 subdriver
->disconnect(intf
);
267 dev
->data
[0] = (unsigned long)NULL
;
270 /* suspend/resume wrappers calling both usbnet and the cdc-wdm
271 * subdriver if present.
273 * NOTE: cdc-wdm also supports pre/post_reset, but we cannot provide
274 * wrappers for those without adding usbnet reset support first.
276 static int qmi_wwan_suspend(struct usb_interface
*intf
, pm_message_t message
)
278 struct usbnet
*dev
= usb_get_intfdata(intf
);
279 struct usb_driver
*subdriver
= (void *)dev
->data
[0];
282 ret
= usbnet_suspend(intf
, message
);
286 if (subdriver
&& subdriver
->suspend
)
287 ret
= subdriver
->suspend(intf
, message
);
294 static int qmi_wwan_resume(struct usb_interface
*intf
)
296 struct usbnet
*dev
= usb_get_intfdata(intf
);
297 struct usb_driver
*subdriver
= (void *)dev
->data
[0];
300 if (subdriver
&& subdriver
->resume
)
301 ret
= subdriver
->resume(intf
);
304 ret
= usbnet_resume(intf
);
305 if (ret
< 0 && subdriver
&& subdriver
->resume
&& subdriver
->suspend
)
306 subdriver
->suspend(intf
, PMSG_SUSPEND
);
312 static const struct driver_info qmi_wwan_info
= {
313 .description
= "QMI speaking wwan device",
315 .bind
= qmi_wwan_bind
,
316 .manage_power
= qmi_wwan_manage_power
,
319 static const struct driver_info qmi_wwan_shared
= {
320 .description
= "QMI speaking wwan device with combined interface",
322 .bind
= qmi_wwan_bind_shared
,
323 .unbind
= qmi_wwan_unbind_shared
,
324 .manage_power
= qmi_wwan_manage_power
,
327 static const struct driver_info qmi_wwan_force_int0
= {
328 .description
= "Qualcomm WWAN/QMI device",
330 .bind
= qmi_wwan_bind_shared
,
331 .unbind
= qmi_wwan_unbind_shared
,
332 .manage_power
= qmi_wwan_manage_power
,
333 .data
= BIT(0), /* interface whitelist bitmap */
336 static const struct driver_info qmi_wwan_force_int1
= {
337 .description
= "Qualcomm WWAN/QMI device",
339 .bind
= qmi_wwan_bind_shared
,
340 .unbind
= qmi_wwan_unbind_shared
,
341 .manage_power
= qmi_wwan_manage_power
,
342 .data
= BIT(1), /* interface whitelist bitmap */
345 static const struct driver_info qmi_wwan_force_int3
= {
346 .description
= "Qualcomm WWAN/QMI device",
348 .bind
= qmi_wwan_bind_shared
,
349 .unbind
= qmi_wwan_unbind_shared
,
350 .manage_power
= qmi_wwan_manage_power
,
351 .data
= BIT(3), /* interface whitelist bitmap */
354 static const struct driver_info qmi_wwan_force_int4
= {
355 .description
= "Qualcomm WWAN/QMI device",
357 .bind
= qmi_wwan_bind_shared
,
358 .unbind
= qmi_wwan_unbind_shared
,
359 .manage_power
= qmi_wwan_manage_power
,
360 .data
= BIT(4), /* interface whitelist bitmap */
363 /* Sierra Wireless provide equally useless interface descriptors
364 * Devices in QMI mode can be switched between two different
366 * a) USB interface #8 is QMI/wwan
367 * b) USB interfaces #8, #19 and #20 are QMI/wwan
369 * Both configurations provide a number of other interfaces (serial++),
370 * some of which have the same endpoint configuration as we expect, so
371 * a whitelist or blacklist is necessary.
373 * FIXME: The below whitelist should include BIT(20). It does not
374 * because I cannot get it to work...
376 static const struct driver_info qmi_wwan_sierra
= {
377 .description
= "Sierra Wireless wwan/QMI device",
379 .bind
= qmi_wwan_bind_shared
,
380 .unbind
= qmi_wwan_unbind_shared
,
381 .manage_power
= qmi_wwan_manage_power
,
382 .data
= BIT(8) | BIT(19), /* interface whitelist bitmap */
385 #define HUAWEI_VENDOR_ID 0x12D1
387 /* Gobi 1000 QMI/wwan interface number is 3 according to qcserial */
388 #define QMI_GOBI1K_DEVICE(vend, prod) \
389 USB_DEVICE(vend, prod), \
390 .driver_info = (unsigned long)&qmi_wwan_force_int3
392 /* Gobi 2000 and Gobi 3000 QMI/wwan interface number is 0 according to qcserial */
393 #define QMI_GOBI_DEVICE(vend, prod) \
394 USB_DEVICE(vend, prod), \
395 .driver_info = (unsigned long)&qmi_wwan_force_int0
397 static const struct usb_device_id products
[] = {
398 { /* Huawei E392, E398 and possibly others sharing both device id and more... */
399 .match_flags
= USB_DEVICE_ID_MATCH_VENDOR
| USB_DEVICE_ID_MATCH_INT_INFO
,
400 .idVendor
= HUAWEI_VENDOR_ID
,
401 .bInterfaceClass
= USB_CLASS_VENDOR_SPEC
,
402 .bInterfaceSubClass
= 1,
403 .bInterfaceProtocol
= 8, /* NOTE: This is the *slave* interface of the CDC Union! */
404 .driver_info
= (unsigned long)&qmi_wwan_info
,
406 { /* Vodafone/Huawei K5005 (12d1:14c8) and similar modems */
407 .match_flags
= USB_DEVICE_ID_MATCH_VENDOR
| USB_DEVICE_ID_MATCH_INT_INFO
,
408 .idVendor
= HUAWEI_VENDOR_ID
,
409 .bInterfaceClass
= USB_CLASS_VENDOR_SPEC
,
410 .bInterfaceSubClass
= 1,
411 .bInterfaceProtocol
= 56, /* NOTE: This is the *slave* interface of the CDC Union! */
412 .driver_info
= (unsigned long)&qmi_wwan_info
,
414 { /* Huawei E392, E398 and possibly others in "Windows mode"
415 * using a combined control and data interface without any CDC
416 * functional descriptors
418 .match_flags
= USB_DEVICE_ID_MATCH_VENDOR
| USB_DEVICE_ID_MATCH_INT_INFO
,
419 .idVendor
= HUAWEI_VENDOR_ID
,
420 .bInterfaceClass
= USB_CLASS_VENDOR_SPEC
,
421 .bInterfaceSubClass
= 1,
422 .bInterfaceProtocol
= 17,
423 .driver_info
= (unsigned long)&qmi_wwan_shared
,
425 { /* Pantech UML290 */
426 .match_flags
= USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO
,
429 .bInterfaceClass
= 0xff,
430 .bInterfaceSubClass
= 0xf0,
431 .bInterfaceProtocol
= 0xff,
432 .driver_info
= (unsigned long)&qmi_wwan_shared
,
435 .match_flags
= USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO
,
438 .bInterfaceClass
= 0xff,
439 .bInterfaceSubClass
= 0xff,
440 .bInterfaceProtocol
= 0xff,
441 .driver_info
= (unsigned long)&qmi_wwan_force_int4
,
443 { /* ZTE (Vodafone) K3520-Z */
444 .match_flags
= USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO
,
447 .bInterfaceClass
= 0xff,
448 .bInterfaceSubClass
= 0xff,
449 .bInterfaceProtocol
= 0xff,
450 .driver_info
= (unsigned long)&qmi_wwan_force_int1
,
452 { /* ZTE (Vodafone) K3565-Z */
453 .match_flags
= USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO
,
456 .bInterfaceClass
= 0xff,
457 .bInterfaceSubClass
= 0xff,
458 .bInterfaceProtocol
= 0xff,
459 .driver_info
= (unsigned long)&qmi_wwan_force_int4
,
461 { /* ZTE (Vodafone) K3570-Z */
462 .match_flags
= USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO
,
465 .bInterfaceClass
= 0xff,
466 .bInterfaceSubClass
= 0xff,
467 .bInterfaceProtocol
= 0xff,
468 .driver_info
= (unsigned long)&qmi_wwan_force_int4
,
470 { /* ZTE (Vodafone) K3571-Z */
471 .match_flags
= USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO
,
474 .bInterfaceClass
= 0xff,
475 .bInterfaceSubClass
= 0xff,
476 .bInterfaceProtocol
= 0xff,
477 .driver_info
= (unsigned long)&qmi_wwan_force_int4
,
479 { /* ZTE (Vodafone) K3765-Z */
480 .match_flags
= USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO
,
483 .bInterfaceClass
= 0xff,
484 .bInterfaceSubClass
= 0xff,
485 .bInterfaceProtocol
= 0xff,
486 .driver_info
= (unsigned long)&qmi_wwan_force_int4
,
488 { /* ZTE (Vodafone) K4505-Z */
489 .match_flags
= USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO
,
492 .bInterfaceClass
= 0xff,
493 .bInterfaceSubClass
= 0xff,
494 .bInterfaceProtocol
= 0xff,
495 .driver_info
= (unsigned long)&qmi_wwan_force_int4
,
497 { /* Sierra Wireless MC77xx in QMI mode */
498 .match_flags
= USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO
,
501 .bInterfaceClass
= 0xff,
502 .bInterfaceSubClass
= 0xff,
503 .bInterfaceProtocol
= 0xff,
504 .driver_info
= (unsigned long)&qmi_wwan_sierra
,
507 /* Gobi 1000 devices */
508 {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
509 {QMI_GOBI1K_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */
510 {QMI_GOBI1K_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */
511 {QMI_GOBI1K_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */
512 {QMI_GOBI1K_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */
513 {QMI_GOBI1K_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */
514 {QMI_GOBI1K_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */
515 {QMI_GOBI1K_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */
516 {QMI_GOBI1K_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */
517 {QMI_GOBI1K_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */
518 {QMI_GOBI1K_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */
519 {QMI_GOBI1K_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */
520 {QMI_GOBI1K_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */
521 {QMI_GOBI1K_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */
523 /* Gobi 2000 and 3000 devices */
524 {QMI_GOBI_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */
525 {QMI_GOBI_DEVICE(0x05c6, 0x920b)}, /* Generic Gobi 2000 Modem device */
526 {QMI_GOBI_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */
527 {QMI_GOBI_DEVICE(0x05c6, 0x9245)}, /* Samsung Gobi 2000 Modem device (VL176) */
528 {QMI_GOBI_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem device (VP412) */
529 {QMI_GOBI_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */
530 {QMI_GOBI_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) */
531 {QMI_GOBI_DEVICE(0x05c6, 0x9235)}, /* Top Global Gobi 2000 Modem device (VR306) */
532 {QMI_GOBI_DEVICE(0x05c6, 0x9275)}, /* iRex Technologies Gobi 2000 Modem device (VR307) */
533 {QMI_GOBI_DEVICE(0x1199, 0x9001)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
534 {QMI_GOBI_DEVICE(0x1199, 0x9002)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
535 {QMI_GOBI_DEVICE(0x1199, 0x9003)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
536 {QMI_GOBI_DEVICE(0x1199, 0x9004)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
537 {QMI_GOBI_DEVICE(0x1199, 0x9005)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
538 {QMI_GOBI_DEVICE(0x1199, 0x9006)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
539 {QMI_GOBI_DEVICE(0x1199, 0x9007)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
540 {QMI_GOBI_DEVICE(0x1199, 0x9008)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
541 {QMI_GOBI_DEVICE(0x1199, 0x9009)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
542 {QMI_GOBI_DEVICE(0x1199, 0x900a)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
543 {QMI_GOBI_DEVICE(0x1199, 0x9011)}, /* Sierra Wireless Gobi 2000 Modem device (MC8305) */
544 {QMI_GOBI_DEVICE(0x16d8, 0x8002)}, /* CMDTech Gobi 2000 Modem device (VU922) */
545 {QMI_GOBI_DEVICE(0x05c6, 0x9205)}, /* Gobi 2000 Modem device */
546 {QMI_GOBI_DEVICE(0x1199, 0x9013)}, /* Sierra Wireless Gobi 3000 Modem device (MC8355) */
547 {QMI_GOBI_DEVICE(0x1199, 0x9015)}, /* Sierra Wireless Gobi 3000 Modem device */
548 {QMI_GOBI_DEVICE(0x1199, 0x9019)}, /* Sierra Wireless Gobi 3000 Modem device */
551 MODULE_DEVICE_TABLE(usb
, products
);
553 static struct usb_driver qmi_wwan_driver
= {
555 .id_table
= products
,
556 .probe
= usbnet_probe
,
557 .disconnect
= usbnet_disconnect
,
558 .suspend
= qmi_wwan_suspend
,
559 .resume
= qmi_wwan_resume
,
560 .reset_resume
= qmi_wwan_resume
,
561 .supports_autosuspend
= 1,
562 .disable_hub_initiated_lpm
= 1,
565 static int __init
qmi_wwan_init(void)
567 return usb_register(&qmi_wwan_driver
);
569 module_init(qmi_wwan_init
);
571 static void __exit
qmi_wwan_exit(void)
573 usb_deregister(&qmi_wwan_driver
);
575 module_exit(qmi_wwan_exit
);
577 MODULE_AUTHOR("Bjørn Mork <bjorn@mork.no>");
578 MODULE_DESCRIPTION("Qualcomm MSM Interface (QMI) WWAN driver");
579 MODULE_LICENSE("GPL");