当前位置:   article > 正文

RK3568-ANDROID11-4G-EC20-驱动篇(移远模块)_移远4g模块驱动下载

移远4g模块驱动下载

首先,要先获得技术支持

步骤一,先在USB模块上完成4G

步骤二,移植到PCIE座子上

磨刀不费砍材功,请先拿到技术文档支持,我的参考是:Quectel_Android_RIL_Driver_V3.3.62_master_beta(支持EC200A).tgz

主要文件:Quectel_Android_RIL_Driver_V3.3.62_master_beta(支持EC200A)\libquectel-ril\arm64-v8a\libreference-ril.so

主要文档:Quectel_Android_RIL_Driver_User_Guide_V2.0.pdf

//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##

驱动部分:

  1. 1.增加4G控制驱动:
  2. A.用的驱动是kernel\drivers\net\lte\lte_rm310.c;
  3. B.\kernel\arch\arm64\configs\rockchip_defconfig;     本来就有的
  4. CONFIG_LTE=y
  5. CONFIG_LTE_RM310=y    
  6. C.device/rockchip/common/BoardConfig.mk     
  7. #enable 3g dongle
  8. BOARD_HAVE_DONGLE ?= false
  9. .......
  10. #for rk 4g modem
  11. -BOARD_HAS_RK_4G_MODEM ?= false                    
  12. +BOARD_HAS_RK_4G_MODEM ?= true
  13. #从false更改为true
  14. ifeq ($(strip $(BOARD_HAS_RK_4G_MODEM)),true)
  15. DEVICE_MANIFEST_FILE := device/rockchip/common/4g_modem/manifest.xml
  16. endif

2.增加驱动内容

  1. \kernel\drivers\usb\serial\option.c
  2. static const struct usb_device_id option_ids[] = {
  3. #if 1 //Added by Quectel
  4. { USB_DEVICE(0x2C7C, 0x0125) }, /* Quectel EC20 R2.0/EC20 R2.1/EC25/EG25-G/EM05 */
  5. { USB_DEVICE(0x2C7C, 0x0121) }, /* Quectel EC21/EG21-G */
  6. { USB_DEVICE(0x2C7C, 0x0191) }, /* Quectel EG91 */
  7. { USB_DEVICE(0x2C7C, 0x0195) }, /* Quectel EG95 */
  8. { USB_DEVICE(0x2C7C, 0x0306) }, /* Quectel EG06/EP06/EM06 */
  9. { USB_DEVICE(0x2C7C, 0x0512) }, /* Quectel EG12/EM12/EG18 */
  10. { USB_DEVICE(0x2C7C, 0x0296) }, /* Quectel BG96 */
  11. { USB_DEVICE(0x2C7C, 0x0700) }, /* Quectel BG95/BG77/BG600L-M3/BC69 */
  12. { USB_DEVICE(0x2C7C, 0x0435) }, /* Quectel AG35 */
  13. { USB_DEVICE(0x2C7C, 0x0415) }, /* Quectel AG15 */
  14. { USB_DEVICE(0x2C7C, 0x0452) }, /* Quectel AG520R */
  15. { USB_DEVICE(0x2C7C, 0x0455) }, /* Quectel AG550R */
  16. { USB_DEVICE(0x2C7C, 0x0620) }, /* Quectel EG20 */
  17. { USB_DEVICE(0x2C7C, 0x0800) }, /* Quectel RG500Q/RM500Q/RG510Q/RM510Q */
  18. { USB_DEVICE(0x1E0E,0x9001),//SIM8200EAM2
  19. .driver_info = RSVD(4) | RSVD(5) | RSVD(6) | RSVD(6)},
  20. #endif
  21. .........
  22. }
  1. \kernel\drivers\usb\serial\option.c
  2. static int option_probe(struct usb_serial *serial,
  3. const struct usb_device_id *id)
  4. {
  5. struct usb_interface_descriptor *iface_desc =
  6. &serial->interface->cur_altsetting->desc;
  7. unsigned long device_flags = id->driver_info;
  8. #if 1 //Added by Quectel
  9. //Quectel UC20's interface 4 can be used as USB Network device
  10. if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) && serial->dev->descriptor.idProduct == cpu_to_le16(0x9003)
  11. && serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
  12. return -ENODEV;
  13. //Quectel EC20(MDM9215)'s interface 4 can be used as USB Network device
  14. if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) && serial->dev->descriptor.idProduct == cpu_to_le16(0x9215)
  15. && serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
  16. return -ENODEV;
  17. if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2C7C)) {
  18. __u16 idProduct = le16_to_cpu(serial->dev->descriptor.idProduct);
  19. //Quectel module's some interfaces can be used as USB Network device (ecm, rndis, mbim)
  20. if (serial->interface->cur_altsetting->desc.bInterfaceClass != 0xFF)
  21. return -ENODEV;
  22. //Quectel EC25&EC20's interface 4 can be used as USB network device (qmi)
  23. if ((idProduct != 0x6026 && idProduct != 0x6120) && serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
  24. return -ENODEV;
  25. }
  26. #endif
  27. ...............
  28. }

  1. \kernel\drivers\usb\serial\option.c
  2. static struct usb_serial_driver option_1port_device = {
  3. .driver = {
  4. .owner = THIS_MODULE,
  5. .name = "option1",
  6. },
  7. .description = "GSM modem (1-port)",
  8. .id_table = option_ids,
  9. .num_ports = 1,
  10. .probe = option_probe,
  11. .open = usb_wwan_open,
  12. .close = usb_wwan_close,
  13. .dtr_rts = usb_wwan_dtr_rts,
  14. .write = usb_wwan_write,
  15. .write_room = usb_wwan_write_room,
  16. .chars_in_buffer = usb_wwan_chars_in_buffer,
  17. .tiocmget = usb_wwan_tiocmget,
  18. .tiocmset = usb_wwan_tiocmset,
  19. .ioctl = usb_wwan_ioctl,
  20. .attach = option_attach,
  21. .release = option_release,
  22. .port_probe = usb_wwan_port_probe,
  23. .port_remove = usb_wwan_port_remove,
  24. .read_int_callback = option_instat_callback,
  25. #ifdef CONFIG_PM
  26. .suspend = usb_wwan_suspend,
  27. .resume = usb_wwan_resume,
  28. #if 1 //Added by Quectel
  29. .reset_resume = usb_wwan_resume,
  30. #endif
  31. #endif
  32. };
  1. \drivers\usb\serial\usb_wwan.c
  2. static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port,
  3. int endpoint,
  4. int dir, void *ctx, char *buf, int len,
  5. void (*callback) (struct urb *))
  6. {
  7. struct usb_serial *serial = port->serial;
  8. struct usb_wwan_intf_private *intfdata = usb_get_serial_data(serial);
  9. struct urb *urb;
  10. struct usb_device_descriptor *desc = &serial->dev->descriptor;
  11. urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */
  12. if (!urb)
  13. return NULL;
  14. usb_fill_bulk_urb(urb, serial->dev,
  15. usb_sndbulkpipe(serial->dev, endpoint) | dir,
  16. buf, len, callback, ctx);
  17. if (intfdata->use_zlp && dir == USB_DIR_OUT)
  18. urb->transfer_flags |= URB_ZERO_PACKET;
  19. if (dir == USB_DIR_OUT) {
  20. if ((desc->idVendor == cpu_to_le16(0x1286) &&
  21. desc->idProduct == cpu_to_le16(0x4e3c)))
  22. urb->transfer_flags |= URB_ZERO_PACKET;
  23. if (desc->idVendor == cpu_to_le16(0x2c7c))
  24. urb->transfer_flags |= URB_ZERO_PACKET;
  25. }
  26. return urb;
  27. }

移植\kernel\drivers\net\usb\qmi_wwan_q.c

makefile

  1. \kernel\drivers\net\usb\Makefile
  2. -obj-$(CONFIG_USB_NET_QMI_WWAN) += qmi_wwan.o
  3. +obj-$(CONFIG_USB_NET_QMI_WWAN) += qmi_wwan_q.o
  4. #实际上只用到qmi_wwan_q.o

这个文件过来下面是整个全部代码参考

//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##

  1. \kernel\drivers\usb\serial\option.c
  2. // SPDX-License-Identifier: GPL-2.0
  3. /*
  4. USB Driver for GSM modems
  5. Copyright (C) 2005 Matthias Urlichs <smurf@smurf.noris.de>
  6. Portions copied from the Keyspan driver by Hugh Blemings <hugh@blemings.org>
  7. History: see the git log.
  8. Work sponsored by: Sigos GmbH, Germany <info@sigos.de>
  9. This driver exists because the "normal" serial driver doesn't work too well
  10. with GSM modems. Issues:
  11. - data loss -- one single Receive URB is not nearly enough
  12. - nonstandard flow (Option devices) control
  13. - controlling the baud rate doesn't make sense
  14. This driver is named "option" because the most common device it's
  15. used for is a PC-Card (with an internal OHCI-USB interface, behind
  16. which the GSM interface sits), made by Option Inc.
  17. Some of the "one port" devices actually exhibit multiple USB instances
  18. on the USB bus. This is not a bug, these ports are used for different
  19. device features.
  20. */
  21. #define DRIVER_AUTHOR "Matthias Urlichs <smurf@smurf.noris.de>"
  22. #define DRIVER_DESC "USB Driver for GSM modems"
  23. #include <linux/kernel.h>
  24. #include <linux/jiffies.h>
  25. #include <linux/errno.h>
  26. #include <linux/tty.h>
  27. #include <linux/tty_flip.h>
  28. #include <linux/slab.h>
  29. #include <linux/module.h>
  30. #include <linux/bitops.h>
  31. #include <linux/usb.h>
  32. #include <linux/usb/serial.h>
  33. #include "usb-wwan.h"
  34. /* Function prototypes */
  35. static int option_probe(struct usb_serial *serial,
  36. const struct usb_device_id *id);
  37. static int option_attach(struct usb_serial *serial);
  38. static void option_release(struct usb_serial *serial);
  39. static void option_instat_callback(struct urb *urb);
  40. /* Vendor and product IDs */
  41. #define OPTION_VENDOR_ID 0x0AF0
  42. #define OPTION_PRODUCT_COLT 0x5000
  43. #define OPTION_PRODUCT_RICOLA 0x6000
  44. #define OPTION_PRODUCT_RICOLA_LIGHT 0x6100
  45. #define OPTION_PRODUCT_RICOLA_QUAD 0x6200
  46. #define OPTION_PRODUCT_RICOLA_QUAD_LIGHT 0x6300
  47. #define OPTION_PRODUCT_RICOLA_NDIS 0x6050
  48. #define OPTION_PRODUCT_RICOLA_NDIS_LIGHT 0x6150
  49. #define OPTION_PRODUCT_RICOLA_NDIS_QUAD 0x6250
  50. #define OPTION_PRODUCT_RICOLA_NDIS_QUAD_LIGHT 0x6350
  51. #define OPTION_PRODUCT_COBRA 0x6500
  52. #define OPTION_PRODUCT_COBRA_BUS 0x6501
  53. #define OPTION_PRODUCT_VIPER 0x6600
  54. #define OPTION_PRODUCT_VIPER_BUS 0x6601
  55. #define OPTION_PRODUCT_GT_MAX_READY 0x6701
  56. #define OPTION_PRODUCT_FUJI_MODEM_LIGHT 0x6721
  57. #define OPTION_PRODUCT_FUJI_MODEM_GT 0x6741
  58. #define OPTION_PRODUCT_FUJI_MODEM_EX 0x6761
  59. #define OPTION_PRODUCT_KOI_MODEM 0x6800
  60. #define OPTION_PRODUCT_SCORPION_MODEM 0x6901
  61. #define OPTION_PRODUCT_ETNA_MODEM 0x7001
  62. #define OPTION_PRODUCT_ETNA_MODEM_LITE 0x7021
  63. #define OPTION_PRODUCT_ETNA_MODEM_GT 0x7041
  64. #define OPTION_PRODUCT_ETNA_MODEM_EX 0x7061
  65. #define OPTION_PRODUCT_ETNA_KOI_MODEM 0x7100
  66. #define OPTION_PRODUCT_GTM380_MODEM 0x7201
  67. #define HUAWEI_VENDOR_ID 0x12D1
  68. #define HUAWEI_PRODUCT_E173 0x140C
  69. #define HUAWEI_PRODUCT_E1750 0x1406
  70. #define HUAWEI_PRODUCT_K4505 0x1464
  71. #define HUAWEI_PRODUCT_K3765 0x1465
  72. #define HUAWEI_PRODUCT_K4605 0x14C6
  73. #define HUAWEI_PRODUCT_E173S6 0x1C07
  74. #define QUANTA_VENDOR_ID 0x0408
  75. #define QUANTA_PRODUCT_Q101 0xEA02
  76. #define QUANTA_PRODUCT_Q111 0xEA03
  77. #define QUANTA_PRODUCT_GLX 0xEA04
  78. #define QUANTA_PRODUCT_GKE 0xEA05
  79. #define QUANTA_PRODUCT_GLE 0xEA06
  80. #define NOVATELWIRELESS_VENDOR_ID 0x1410
  81. /* YISO PRODUCTS */
  82. #define YISO_VENDOR_ID 0x0EAB
  83. #define YISO_PRODUCT_U893 0xC893
  84. /*
  85. * NOVATEL WIRELESS PRODUCTS
  86. *
  87. * Note from Novatel Wireless:
  88. * If your Novatel modem does not work on linux, don't
  89. * change the option module, but check our website. If
  90. * that does not help, contact ddeschepper@nvtl.com
  91. */
  92. /* MERLIN EVDO PRODUCTS */
  93. #define NOVATELWIRELESS_PRODUCT_V640 0x1100
  94. #define NOVATELWIRELESS_PRODUCT_V620 0x1110
  95. #define NOVATELWIRELESS_PRODUCT_V740 0x1120
  96. #define NOVATELWIRELESS_PRODUCT_V720 0x1130
  97. /* MERLIN HSDPA/HSPA PRODUCTS */
  98. #define NOVATELWIRELESS_PRODUCT_U730 0x1400
  99. #define NOVATELWIRELESS_PRODUCT_U740 0x1410
  100. #define NOVATELWIRELESS_PRODUCT_U870 0x1420
  101. #define NOVATELWIRELESS_PRODUCT_XU870 0x1430
  102. #define NOVATELWIRELESS_PRODUCT_X950D 0x1450
  103. /* EXPEDITE PRODUCTS */
  104. #define NOVATELWIRELESS_PRODUCT_EV620 0x2100
  105. #define NOVATELWIRELESS_PRODUCT_ES720 0x2110
  106. #define NOVATELWIRELESS_PRODUCT_E725 0x2120
  107. #define NOVATELWIRELESS_PRODUCT_ES620 0x2130
  108. #define NOVATELWIRELESS_PRODUCT_EU730 0x2400
  109. #define NOVATELWIRELESS_PRODUCT_EU740 0x2410
  110. #define NOVATELWIRELESS_PRODUCT_EU870D 0x2420
  111. /* OVATION PRODUCTS */
  112. #define NOVATELWIRELESS_PRODUCT_MC727 0x4100
  113. #define NOVATELWIRELESS_PRODUCT_MC950D 0x4400
  114. /*
  115. * Note from Novatel Wireless:
  116. * All PID in the 5xxx range are currently reserved for
  117. * auto-install CDROMs, and should not be added to this
  118. * module.
  119. *
  120. * #define NOVATELWIRELESS_PRODUCT_U727 0x5010
  121. * #define NOVATELWIRELESS_PRODUCT_MC727_NEW 0x5100
  122. */
  123. #define NOVATELWIRELESS_PRODUCT_OVMC760 0x6002
  124. #define NOVATELWIRELESS_PRODUCT_MC780 0x6010
  125. #define NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED 0x6000
  126. #define NOVATELWIRELESS_PRODUCT_EVDO_HIGHSPEED 0x6001
  127. #define NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED 0x7000
  128. #define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED 0x7001
  129. #define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED3 0x7003
  130. #define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED4 0x7004
  131. #define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED5 0x7005
  132. #define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED6 0x7006
  133. #define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED7 0x7007
  134. #define NOVATELWIRELESS_PRODUCT_MC996D 0x7030
  135. #define NOVATELWIRELESS_PRODUCT_MF3470 0x7041
  136. #define NOVATELWIRELESS_PRODUCT_MC547 0x7042
  137. #define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED 0x8000
  138. #define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED 0x8001
  139. #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED 0x9000
  140. #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0x9001
  141. #define NOVATELWIRELESS_PRODUCT_E362 0x9010
  142. #define NOVATELWIRELESS_PRODUCT_E371 0x9011
  143. #define NOVATELWIRELESS_PRODUCT_U620L 0x9022
  144. #define NOVATELWIRELESS_PRODUCT_G2 0xA010
  145. #define NOVATELWIRELESS_PRODUCT_MC551 0xB001
  146. /* AMOI PRODUCTS */
  147. #define AMOI_VENDOR_ID 0x1614
  148. #define AMOI_PRODUCT_H01 0x0800
  149. #define AMOI_PRODUCT_H01A 0x7002
  150. #define AMOI_PRODUCT_H02 0x0802
  151. #define AMOI_PRODUCT_SKYPEPHONE_S2 0x0407
  152. #define DELL_VENDOR_ID 0x413C
  153. /* Dell modems */
  154. #define DELL_PRODUCT_5700_MINICARD 0x8114
  155. #define DELL_PRODUCT_5500_MINICARD 0x8115
  156. #define DELL_PRODUCT_5505_MINICARD 0x8116
  157. #define DELL_PRODUCT_5700_EXPRESSCARD 0x8117
  158. #define DELL_PRODUCT_5510_EXPRESSCARD 0x8118
  159. #define DELL_PRODUCT_5700_MINICARD_SPRINT 0x8128
  160. #define DELL_PRODUCT_5700_MINICARD_TELUS 0x8129
  161. #define DELL_PRODUCT_5720_MINICARD_VZW 0x8133
  162. #define DELL_PRODUCT_5720_MINICARD_SPRINT 0x8134
  163. #define DELL_PRODUCT_5720_MINICARD_TELUS 0x8135
  164. #define DELL_PRODUCT_5520_MINICARD_CINGULAR 0x8136
  165. #define DELL_PRODUCT_5520_MINICARD_GENERIC_L 0x8137
  166. #define DELL_PRODUCT_5520_MINICARD_GENERIC_I 0x8138
  167. #define DELL_PRODUCT_5730_MINICARD_SPRINT 0x8180
  168. #define DELL_PRODUCT_5730_MINICARD_TELUS 0x8181
  169. #define DELL_PRODUCT_5730_MINICARD_VZW 0x8182
  170. #define DELL_PRODUCT_5800_MINICARD_VZW 0x8195 /* Novatel E362 */
  171. #define DELL_PRODUCT_5800_V2_MINICARD_VZW 0x8196 /* Novatel E362 */
  172. #define DELL_PRODUCT_5804_MINICARD_ATT 0x819b /* Novatel E371 */
  173. #define DELL_PRODUCT_5821E 0x81d7
  174. #define DELL_PRODUCT_5821E_ESIM 0x81e0
  175. #define KYOCERA_VENDOR_ID 0x0c88
  176. #define KYOCERA_PRODUCT_KPC650 0x17da
  177. #define KYOCERA_PRODUCT_KPC680 0x180a
  178. #define ANYDATA_VENDOR_ID 0x16d5
  179. #define ANYDATA_PRODUCT_ADU_620UW 0x6202
  180. #define ANYDATA_PRODUCT_ADU_E100A 0x6501
  181. #define ANYDATA_PRODUCT_ADU_500A 0x6502
  182. #define AXESSTEL_VENDOR_ID 0x1726
  183. #define AXESSTEL_PRODUCT_MV110H 0x1000
  184. #define BANDRICH_VENDOR_ID 0x1A8D
  185. #define BANDRICH_PRODUCT_C100_1 0x1002
  186. #define BANDRICH_PRODUCT_C100_2 0x1003
  187. #define BANDRICH_PRODUCT_1004 0x1004
  188. #define BANDRICH_PRODUCT_1005 0x1005
  189. #define BANDRICH_PRODUCT_1006 0x1006
  190. #define BANDRICH_PRODUCT_1007 0x1007
  191. #define BANDRICH_PRODUCT_1008 0x1008
  192. #define BANDRICH_PRODUCT_1009 0x1009
  193. #define BANDRICH_PRODUCT_100A 0x100a
  194. #define BANDRICH_PRODUCT_100B 0x100b
  195. #define BANDRICH_PRODUCT_100C 0x100c
  196. #define BANDRICH_PRODUCT_100D 0x100d
  197. #define BANDRICH_PRODUCT_100E 0x100e
  198. #define BANDRICH_PRODUCT_100F 0x100f
  199. #define BANDRICH_PRODUCT_1010 0x1010
  200. #define BANDRICH_PRODUCT_1011 0x1011
  201. #define BANDRICH_PRODUCT_1012 0x1012
  202. #define QUALCOMM_VENDOR_ID 0x05C6
  203. /* These Quectel products use Qualcomm's vendor ID */
  204. #define QUECTEL_PRODUCT_UC20 0x9003
  205. #define QUECTEL_PRODUCT_UC15 0x9090
  206. /* These u-blox products use Qualcomm's vendor ID */
  207. #define UBLOX_PRODUCT_R410M 0x90b2
  208. /* These Yuga products use Qualcomm's vendor ID */
  209. #define YUGA_PRODUCT_CLM920_NC5 0x9625
  210. #define QUECTEL_VENDOR_ID 0x2c7c
  211. /* These Quectel products use Quectel's vendor ID */
  212. #define QUECTEL_PRODUCT_EC21 0x0121
  213. #define QUECTEL_PRODUCT_EC25 0x0125
  214. #define QUECTEL_PRODUCT_EG95 0x0195
  215. #define QUECTEL_PRODUCT_BG96 0x0296
  216. #define QUECTEL_PRODUCT_EP06 0x0306
  217. #define QUECTEL_PRODUCT_EM12 0x0512
  218. #define QUECTEL_PRODUCT_RM500Q 0x0800
  219. #define QUECTEL_PRODUCT_EC200T 0x6026
  220. #define CMOTECH_VENDOR_ID 0x16d8
  221. #define CMOTECH_PRODUCT_6001 0x6001
  222. #define CMOTECH_PRODUCT_CMU_300 0x6002
  223. #define CMOTECH_PRODUCT_6003 0x6003
  224. #define CMOTECH_PRODUCT_6004 0x6004
  225. #define CMOTECH_PRODUCT_6005 0x6005
  226. #define CMOTECH_PRODUCT_CGU_628A 0x6006
  227. #define CMOTECH_PRODUCT_CHE_628S 0x6007
  228. #define CMOTECH_PRODUCT_CMU_301 0x6008
  229. #define CMOTECH_PRODUCT_CHU_628 0x6280
  230. #define CMOTECH_PRODUCT_CHU_628S 0x6281
  231. #define CMOTECH_PRODUCT_CDU_680 0x6803
  232. #define CMOTECH_PRODUCT_CDU_685A 0x6804
  233. #define CMOTECH_PRODUCT_CHU_720S 0x7001
  234. #define CMOTECH_PRODUCT_7002 0x7002
  235. #define CMOTECH_PRODUCT_CHU_629K 0x7003
  236. #define CMOTECH_PRODUCT_7004 0x7004
  237. #define CMOTECH_PRODUCT_7005 0x7005
  238. #define CMOTECH_PRODUCT_CGU_629 0x7006
  239. #define CMOTECH_PRODUCT_CHU_629S 0x700a
  240. #define CMOTECH_PRODUCT_CHU_720I 0x7211
  241. #define CMOTECH_PRODUCT_7212 0x7212
  242. #define CMOTECH_PRODUCT_7213 0x7213
  243. #define CMOTECH_PRODUCT_7251 0x7251
  244. #define CMOTECH_PRODUCT_7252 0x7252
  245. #define CMOTECH_PRODUCT_7253 0x7253
  246. #define TELIT_VENDOR_ID 0x1bc7
  247. #define TELIT_PRODUCT_UC864E 0x1003
  248. #define TELIT_PRODUCT_UC864G 0x1004
  249. #define TELIT_PRODUCT_CC864_DUAL 0x1005
  250. #define TELIT_PRODUCT_CC864_SINGLE 0x1006
  251. #define TELIT_PRODUCT_DE910_DUAL 0x1010
  252. #define TELIT_PRODUCT_UE910_V2 0x1012
  253. #define TELIT_PRODUCT_LE922_USBCFG1 0x1040
  254. #define TELIT_PRODUCT_LE922_USBCFG2 0x1041
  255. #define TELIT_PRODUCT_LE922_USBCFG0 0x1042
  256. #define TELIT_PRODUCT_LE922_USBCFG3 0x1043
  257. #define TELIT_PRODUCT_LE922_USBCFG5 0x1045
  258. #define TELIT_PRODUCT_ME910 0x1100
  259. #define TELIT_PRODUCT_ME910_DUAL_MODEM 0x1101
  260. #define TELIT_PRODUCT_LE920 0x1200
  261. #define TELIT_PRODUCT_LE910 0x1201
  262. #define TELIT_PRODUCT_LE910_USBCFG4 0x1206
  263. #define TELIT_PRODUCT_LE920A4_1207 0x1207
  264. #define TELIT_PRODUCT_LE920A4_1208 0x1208
  265. #define TELIT_PRODUCT_LE920A4_1211 0x1211
  266. #define TELIT_PRODUCT_LE920A4_1212 0x1212
  267. #define TELIT_PRODUCT_LE920A4_1213 0x1213
  268. #define TELIT_PRODUCT_LE920A4_1214 0x1214
  269. /* ZTE PRODUCTS */
  270. #define ZTE_VENDOR_ID 0x19d2
  271. #define ZTE_PRODUCT_MF622 0x0001
  272. #define ZTE_PRODUCT_MF628 0x0015
  273. #define ZTE_PRODUCT_MF626 0x0031
  274. #define ZTE_PRODUCT_ZM8620_X 0x0396
  275. #define ZTE_PRODUCT_ME3620_MBIM 0x0426
  276. #define ZTE_PRODUCT_ME3620_X 0x1432
  277. #define ZTE_PRODUCT_ME3620_L 0x1433
  278. #define ZTE_PRODUCT_AC2726 0xfff1
  279. #define ZTE_PRODUCT_MG880 0xfffd
  280. #define ZTE_PRODUCT_CDMA_TECH 0xfffe
  281. #define ZTE_PRODUCT_AC8710T 0xffff
  282. #define ZTE_PRODUCT_MC2718 0xffe8
  283. #define ZTE_PRODUCT_AD3812 0xffeb
  284. #define ZTE_PRODUCT_MC2716 0xffed
  285. #define BENQ_VENDOR_ID 0x04a5
  286. #define BENQ_PRODUCT_H10 0x4068
  287. #define DLINK_VENDOR_ID 0x1186
  288. #define DLINK_PRODUCT_DWM_652 0x3e04
  289. #define DLINK_PRODUCT_DWM_652_U5 0xce16
  290. #define DLINK_PRODUCT_DWM_652_U5A 0xce1e
  291. #define QISDA_VENDOR_ID 0x1da5
  292. #define QISDA_PRODUCT_H21_4512 0x4512
  293. #define QISDA_PRODUCT_H21_4523 0x4523
  294. #define QISDA_PRODUCT_H20_4515 0x4515
  295. #define QISDA_PRODUCT_H20_4518 0x4518
  296. #define QISDA_PRODUCT_H20_4519 0x4519
  297. /* TLAYTECH PRODUCTS */
  298. #define TLAYTECH_VENDOR_ID 0x20B9
  299. #define TLAYTECH_PRODUCT_TEU800 0x1682
  300. /* TOSHIBA PRODUCTS */
  301. #define TOSHIBA_VENDOR_ID 0x0930
  302. #define TOSHIBA_PRODUCT_HSDPA_MINICARD 0x1302
  303. #define TOSHIBA_PRODUCT_G450 0x0d45
  304. #define ALINK_VENDOR_ID 0x1e0e
  305. #define SIMCOM_PRODUCT_SIM7100E 0x9001 /* Yes, ALINK_VENDOR_ID */
  306. #define ALINK_PRODUCT_PH300 0x9100
  307. #define ALINK_PRODUCT_3GU 0x9200
  308. /* ALCATEL PRODUCTS */
  309. #define ALCATEL_VENDOR_ID 0x1bbb
  310. #define ALCATEL_PRODUCT_X060S_X200 0x0000
  311. #define ALCATEL_PRODUCT_X220_X500D 0x0017
  312. #define ALCATEL_PRODUCT_L100V 0x011e
  313. #define ALCATEL_PRODUCT_L800MA 0x0203
  314. #define PIRELLI_VENDOR_ID 0x1266
  315. #define PIRELLI_PRODUCT_C100_1 0x1002
  316. #define PIRELLI_PRODUCT_C100_2 0x1003
  317. #define PIRELLI_PRODUCT_1004 0x1004
  318. #define PIRELLI_PRODUCT_1005 0x1005
  319. #define PIRELLI_PRODUCT_1006 0x1006
  320. #define PIRELLI_PRODUCT_1007 0x1007
  321. #define PIRELLI_PRODUCT_1008 0x1008
  322. #define PIRELLI_PRODUCT_1009 0x1009
  323. #define PIRELLI_PRODUCT_100A 0x100a
  324. #define PIRELLI_PRODUCT_100B 0x100b
  325. #define PIRELLI_PRODUCT_100C 0x100c
  326. #define PIRELLI_PRODUCT_100D 0x100d
  327. #define PIRELLI_PRODUCT_100E 0x100e
  328. #define PIRELLI_PRODUCT_100F 0x100f
  329. #define PIRELLI_PRODUCT_1011 0x1011
  330. #define PIRELLI_PRODUCT_1012 0x1012
  331. /* Airplus products */
  332. #define AIRPLUS_VENDOR_ID 0x1011
  333. #define AIRPLUS_PRODUCT_MCD650 0x3198
  334. /* Longcheer/Longsung vendor ID; makes whitelabel devices that
  335. * many other vendors like 4G Systems, Alcatel, ChinaBird,
  336. * Mobidata, etc sell under their own brand names.
  337. */
  338. #define LONGCHEER_VENDOR_ID 0x1c9e
  339. /* 4G Systems products */
  340. /* This is the 4G XS Stick W14 a.k.a. Mobilcom Debitel Surf-Stick *
  341. * It seems to contain a Qualcomm QSC6240/6290 chipset */
  342. #define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603
  343. #define FOUR_G_SYSTEMS_PRODUCT_W100 0x9b01
  344. /* Fujisoft products */
  345. #define FUJISOFT_PRODUCT_FS040U 0x9b02
  346. /* iBall 3.5G connect wireless modem */
  347. #define IBALL_3_5G_CONNECT 0x9605
  348. /* Zoom */
  349. #define ZOOM_PRODUCT_4597 0x9607
  350. /* SpeedUp SU9800 usb 3g modem */
  351. #define SPEEDUP_PRODUCT_SU9800 0x9800
  352. /* Haier products */
  353. #define HAIER_VENDOR_ID 0x201e
  354. #define HAIER_PRODUCT_CE81B 0x10f8
  355. #define HAIER_PRODUCT_CE100 0x2009
  356. /* Gemalto's Cinterion products (formerly Siemens) */
  357. #define SIEMENS_VENDOR_ID 0x0681
  358. #define CINTERION_VENDOR_ID 0x1e2d
  359. #define CINTERION_PRODUCT_HC25_MDMNET 0x0040
  360. #define CINTERION_PRODUCT_HC25_MDM 0x0047
  361. #define CINTERION_PRODUCT_HC28_MDMNET 0x004A /* same for HC28J */
  362. #define CINTERION_PRODUCT_HC28_MDM 0x004C
  363. #define CINTERION_PRODUCT_EU3_E 0x0051
  364. #define CINTERION_PRODUCT_EU3_P 0x0052
  365. #define CINTERION_PRODUCT_PH8 0x0053
  366. #define CINTERION_PRODUCT_AHXX 0x0055
  367. #define CINTERION_PRODUCT_PLXX 0x0060
  368. #define CINTERION_PRODUCT_EXS82 0x006c
  369. #define CINTERION_PRODUCT_PH8_2RMNET 0x0082
  370. #define CINTERION_PRODUCT_PH8_AUDIO 0x0083
  371. #define CINTERION_PRODUCT_AHXX_2RMNET 0x0084
  372. #define CINTERION_PRODUCT_AHXX_AUDIO 0x0085
  373. #define CINTERION_PRODUCT_CLS8 0x00b0
  374. #define CINTERION_PRODUCT_MV31_MBIM 0x00b3
  375. #define CINTERION_PRODUCT_MV31_RMNET 0x00b7
  376. /* Olivetti products */
  377. #define OLIVETTI_VENDOR_ID 0x0b3c
  378. #define OLIVETTI_PRODUCT_OLICARD100 0xc000
  379. #define OLIVETTI_PRODUCT_OLICARD120 0xc001
  380. #define OLIVETTI_PRODUCT_OLICARD140 0xc002
  381. #define OLIVETTI_PRODUCT_OLICARD145 0xc003
  382. #define OLIVETTI_PRODUCT_OLICARD155 0xc004
  383. #define OLIVETTI_PRODUCT_OLICARD200 0xc005
  384. #define OLIVETTI_PRODUCT_OLICARD160 0xc00a
  385. #define OLIVETTI_PRODUCT_OLICARD500 0xc00b
  386. /* Celot products */
  387. #define CELOT_VENDOR_ID 0x211f
  388. #define CELOT_PRODUCT_CT680M 0x6801
  389. /* Samsung products */
  390. #define SAMSUNG_VENDOR_ID 0x04e8
  391. #define SAMSUNG_PRODUCT_GT_B3730 0x6889
  392. /* YUGA products www.yuga-info.com gavin.kx@qq.com */
  393. #define YUGA_VENDOR_ID 0x257A
  394. #define YUGA_PRODUCT_CEM600 0x1601
  395. #define YUGA_PRODUCT_CEM610 0x1602
  396. #define YUGA_PRODUCT_CEM500 0x1603
  397. #define YUGA_PRODUCT_CEM510 0x1604
  398. #define YUGA_PRODUCT_CEM800 0x1605
  399. #define YUGA_PRODUCT_CEM900 0x1606
  400. #define YUGA_PRODUCT_CEU818 0x1607
  401. #define YUGA_PRODUCT_CEU816 0x1608
  402. #define YUGA_PRODUCT_CEU828 0x1609
  403. #define YUGA_PRODUCT_CEU826 0x160A
  404. #define YUGA_PRODUCT_CEU518 0x160B
  405. #define YUGA_PRODUCT_CEU516 0x160C
  406. #define YUGA_PRODUCT_CEU528 0x160D
  407. #define YUGA_PRODUCT_CEU526 0x160F
  408. #define YUGA_PRODUCT_CEU881 0x161F
  409. #define YUGA_PRODUCT_CEU882 0x162F
  410. #define YUGA_PRODUCT_CWM600 0x2601
  411. #define YUGA_PRODUCT_CWM610 0x2602
  412. #define YUGA_PRODUCT_CWM500 0x2603
  413. #define YUGA_PRODUCT_CWM510 0x2604
  414. #define YUGA_PRODUCT_CWM800 0x2605
  415. #define YUGA_PRODUCT_CWM900 0x2606
  416. #define YUGA_PRODUCT_CWU718 0x2607
  417. #define YUGA_PRODUCT_CWU716 0x2608
  418. #define YUGA_PRODUCT_CWU728 0x2609
  419. #define YUGA_PRODUCT_CWU726 0x260A
  420. #define YUGA_PRODUCT_CWU518 0x260B
  421. #define YUGA_PRODUCT_CWU516 0x260C
  422. #define YUGA_PRODUCT_CWU528 0x260D
  423. #define YUGA_PRODUCT_CWU581 0x260E
  424. #define YUGA_PRODUCT_CWU526 0x260F
  425. #define YUGA_PRODUCT_CWU582 0x261F
  426. #define YUGA_PRODUCT_CWU583 0x262F
  427. #define YUGA_PRODUCT_CLM600 0x3601
  428. #define YUGA_PRODUCT_CLM610 0x3602
  429. #define YUGA_PRODUCT_CLM500 0x3603
  430. #define YUGA_PRODUCT_CLM510 0x3604
  431. #define YUGA_PRODUCT_CLM800 0x3605
  432. #define YUGA_PRODUCT_CLM900 0x3606
  433. #define YUGA_PRODUCT_CLU718 0x3607
  434. #define YUGA_PRODUCT_CLU716 0x3608
  435. #define YUGA_PRODUCT_CLU728 0x3609
  436. #define YUGA_PRODUCT_CLU726 0x360A
  437. #define YUGA_PRODUCT_CLU518 0x360B
  438. #define YUGA_PRODUCT_CLU516 0x360C
  439. #define YUGA_PRODUCT_CLU528 0x360D
  440. #define YUGA_PRODUCT_CLU526 0x360F
  441. /* Viettel products */
  442. #define VIETTEL_VENDOR_ID 0x2262
  443. #define VIETTEL_PRODUCT_VT1000 0x0002
  444. /* ZD Incorporated */
  445. #define ZD_VENDOR_ID 0x0685
  446. #define ZD_PRODUCT_7000 0x7000
  447. /* LG products */
  448. #define LG_VENDOR_ID 0x1004
  449. #define LG_PRODUCT_L02C 0x618f
  450. /* MediaTek products */
  451. #define MEDIATEK_VENDOR_ID 0x0e8d
  452. #define MEDIATEK_PRODUCT_DC_1COM 0x00a0
  453. #define MEDIATEK_PRODUCT_DC_4COM 0x00a5
  454. #define MEDIATEK_PRODUCT_DC_4COM2 0x00a7
  455. #define MEDIATEK_PRODUCT_DC_5COM 0x00a4
  456. #define MEDIATEK_PRODUCT_7208_1COM 0x7101
  457. #define MEDIATEK_PRODUCT_7208_2COM 0x7102
  458. #define MEDIATEK_PRODUCT_7103_2COM 0x7103
  459. #define MEDIATEK_PRODUCT_7106_2COM 0x7106
  460. #define MEDIATEK_PRODUCT_FP_1COM 0x0003
  461. #define MEDIATEK_PRODUCT_FP_2COM 0x0023
  462. #define MEDIATEK_PRODUCT_FPDC_1COM 0x0043
  463. #define MEDIATEK_PRODUCT_FPDC_2COM 0x0033
  464. /* Cellient products */
  465. #define CELLIENT_VENDOR_ID 0x2692
  466. #define CELLIENT_PRODUCT_MEN200 0x9005
  467. #define CELLIENT_PRODUCT_MPL200 0x9025
  468. /* Hyundai Petatel Inc. products */
  469. #define PETATEL_VENDOR_ID 0x1ff4
  470. #define PETATEL_PRODUCT_NP10T_600A 0x600a
  471. #define PETATEL_PRODUCT_NP10T_600E 0x600e
  472. /* TP-LINK Incorporated products */
  473. #define TPLINK_VENDOR_ID 0x2357
  474. #define TPLINK_PRODUCT_LTE 0x000D
  475. #define TPLINK_PRODUCT_MA180 0x0201
  476. /* Changhong products */
  477. #define CHANGHONG_VENDOR_ID 0x2077
  478. #define CHANGHONG_PRODUCT_CH690 0x7001
  479. /* Inovia */
  480. #define INOVIA_VENDOR_ID 0x20a6
  481. #define INOVIA_SEW858 0x1105
  482. /* VIA Telecom */
  483. #define VIATELECOM_VENDOR_ID 0x15eb
  484. #define VIATELECOM_PRODUCT_CDS7 0x0001
  485. /* WeTelecom products */
  486. #define WETELECOM_VENDOR_ID 0x22de
  487. #define WETELECOM_PRODUCT_WMD200 0x6801
  488. #define WETELECOM_PRODUCT_6802 0x6802
  489. #define WETELECOM_PRODUCT_WMD300 0x6803
  490. /* Device flags */
  491. /* Highest interface number which can be used with NCTRL() and RSVD() */
  492. #define FLAG_IFNUM_MAX 7
  493. /* Interface does not support modem-control requests */
  494. #define NCTRL(ifnum) ((BIT(ifnum) & 0xff) << 8)
  495. /* Interface is reserved */
  496. #define RSVD(ifnum) ((BIT(ifnum) & 0xff) << 0)
  497. /* Interface must have two endpoints */
  498. #define NUMEP2 BIT(16)
  499. /* Device needs ZLP */
  500. #define ZLP BIT(17)
  501. static const struct usb_device_id option_ids[] = {
  502. #if 1 //Added by Quectel
  503. { USB_DEVICE(0x2C7C, 0x0125) }, /* Quectel EC20 R2.0/EC20 R2.1/EC25/EG25-G/EM05 */
  504. { USB_DEVICE(0x2C7C, 0x0121) }, /* Quectel EC21/EG21-G */
  505. { USB_DEVICE(0x2C7C, 0x0191) }, /* Quectel EG91 */
  506. { USB_DEVICE(0x2C7C, 0x0195) }, /* Quectel EG95 */
  507. { USB_DEVICE(0x2C7C, 0x0306) }, /* Quectel EG06/EP06/EM06 */
  508. { USB_DEVICE(0x2C7C, 0x0512) }, /* Quectel EG12/EM12/EG18 */
  509. { USB_DEVICE(0x2C7C, 0x0296) }, /* Quectel BG96 */
  510. { USB_DEVICE(0x2C7C, 0x0700) }, /* Quectel BG95/BG77/BG600L-M3/BC69 */
  511. { USB_DEVICE(0x2C7C, 0x0435) }, /* Quectel AG35 */
  512. { USB_DEVICE(0x2C7C, 0x0415) }, /* Quectel AG15 */
  513. { USB_DEVICE(0x2C7C, 0x0452) }, /* Quectel AG520R */
  514. { USB_DEVICE(0x2C7C, 0x0455) }, /* Quectel AG550R */
  515. { USB_DEVICE(0x2C7C, 0x0620) }, /* Quectel EG20 */
  516. { USB_DEVICE(0x2C7C, 0x0800) }, /* Quectel RG500Q/RM500Q/RG510Q/RM510Q */
  517. { USB_DEVICE(0x1E0E,0x9001),//SIM8200EAM2
  518. .driver_info = RSVD(4) | RSVD(5) | RSVD(6) | RSVD(6)},
  519. #endif
  520. { USB_DEVICE(0x1286, 0x4e3c) },
  521. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
  522. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
  523. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_LIGHT) },
  524. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_QUAD) },
  525. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_QUAD_LIGHT) },
  526. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_NDIS) },
  527. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_NDIS_LIGHT) },
  528. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_NDIS_QUAD) },
  529. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_NDIS_QUAD_LIGHT) },
  530. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA) },
  531. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA_BUS) },
  532. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_VIPER) },
  533. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_VIPER_BUS) },
  534. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GT_MAX_READY) },
  535. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUJI_MODEM_LIGHT) },
  536. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUJI_MODEM_GT) },
  537. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUJI_MODEM_EX) },
  538. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_KOI_MODEM) },
  539. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_SCORPION_MODEM) },
  540. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM) },
  541. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_LITE) },
  542. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_GT) },
  543. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_EX) },
  544. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) },
  545. { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GTM380_MODEM) },
  546. { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_Q101) },
  547. { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_Q111) },
  548. { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLX) },
  549. { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GKE) },
  550. { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) },
  551. { USB_DEVICE(QUANTA_VENDOR_ID, 0xea42),
  552. .driver_info = RSVD(4) },
  553. { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c05, USB_CLASS_COMM, 0x02, 0xff) },
  554. { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c1f, USB_CLASS_COMM, 0x02, 0xff) },
  555. { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c23, USB_CLASS_COMM, 0x02, 0xff) },
  556. { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173, 0xff, 0xff, 0xff),
  557. .driver_info = RSVD(1) },
  558. { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173S6, 0xff, 0xff, 0xff),
  559. .driver_info = RSVD(1) },
  560. { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1750, 0xff, 0xff, 0xff),
  561. .driver_info = RSVD(2) },
  562. { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1441, USB_CLASS_COMM, 0x02, 0xff) },
  563. { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1442, USB_CLASS_COMM, 0x02, 0xff) },
  564. { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff),
  565. .driver_info = RSVD(1) | RSVD(2) },
  566. { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff),
  567. .driver_info = RSVD(1) | RSVD(2) },
  568. { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x14ac, 0xff, 0xff, 0xff), /* Huawei E1820 */
  569. .driver_info = RSVD(1) },
  570. { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff),
  571. .driver_info = RSVD(1) | RSVD(2) },
  572. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0xff, 0xff) },
  573. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x01) },
  574. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x02) },
  575. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x03) },
  576. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x04) },
  577. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x05) },
  578. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x06) },
  579. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0A) },
  580. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0B) },
  581. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0D) },
  582. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0E) },
  583. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0F) },
  584. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x10) },
  585. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x12) },
  586. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x13) },
  587. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x14) },
  588. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x15) },
  589. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x17) },
  590. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x18) },
  591. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x19) },
  592. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x1A) },
  593. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x1B) },
  594. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x1C) },
  595. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x31) },
  596. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x32) },
  597. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x33) },
  598. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x34) },
  599. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x35) },
  600. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x36) },
  601. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3A) },
  602. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3B) },
  603. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3D) },
  604. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3E) },
  605. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3F) },
  606. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x48) },
  607. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x49) },
  608. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x4A) },
  609. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x4B) },
  610. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x4C) },
  611. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x61) },
  612. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x62) },
  613. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x63) },
  614. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x64) },
  615. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x65) },
  616. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x66) },
  617. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6A) },
  618. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6B) },
  619. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6D) },
  620. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6E) },
  621. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6F) },
  622. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x72) },
  623. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x73) },
  624. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x74) },
  625. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x75) },
  626. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x78) },
  627. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x79) },
  628. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x7A) },
  629. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x7B) },
  630. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x7C) },
  631. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x01) },
  632. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x02) },
  633. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x03) },
  634. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x04) },
  635. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x05) },
  636. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x06) },
  637. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0A) },
  638. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0B) },
  639. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0D) },
  640. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0E) },
  641. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0F) },
  642. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x10) },
  643. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x12) },
  644. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x13) },
  645. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x14) },
  646. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x15) },
  647. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x17) },
  648. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x18) },
  649. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x19) },
  650. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x1A) },
  651. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x1B) },
  652. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x1C) },
  653. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x31) },
  654. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x32) },
  655. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x33) },
  656. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x34) },
  657. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x35) },
  658. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x36) },
  659. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3A) },
  660. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3B) },
  661. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3D) },
  662. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3E) },
  663. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3F) },
  664. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x48) },
  665. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x49) },
  666. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x4A) },
  667. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x4B) },
  668. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x4C) },
  669. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x61) },
  670. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x62) },
  671. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x63) },
  672. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x64) },
  673. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x65) },
  674. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x66) },
  675. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6A) },
  676. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6B) },
  677. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6D) },
  678. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6E) },
  679. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6F) },
  680. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x72) },
  681. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x73) },
  682. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x74) },
  683. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x75) },
  684. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x78) },
  685. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x79) },
  686. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7A) },
  687. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7B) },
  688. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7C) },
  689. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x01) },
  690. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x02) },
  691. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x03) },
  692. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x04) },
  693. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x05) },
  694. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x06) },
  695. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0A) },
  696. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0B) },
  697. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0D) },
  698. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0E) },
  699. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0F) },
  700. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x10) },
  701. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x12) },
  702. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x13) },
  703. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x14) },
  704. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x15) },
  705. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x17) },
  706. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x18) },
  707. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x19) },
  708. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x1A) },
  709. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x1B) },
  710. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x1C) },
  711. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x31) },
  712. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x32) },
  713. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x33) },
  714. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x34) },
  715. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x35) },
  716. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x36) },
  717. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3A) },
  718. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3B) },
  719. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3D) },
  720. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3E) },
  721. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3F) },
  722. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x48) },
  723. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x49) },
  724. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x4A) },
  725. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x4B) },
  726. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x4C) },
  727. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x61) },
  728. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x62) },
  729. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x63) },
  730. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x64) },
  731. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x65) },
  732. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x66) },
  733. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6A) },
  734. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6B) },
  735. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6D) },
  736. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6E) },
  737. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6F) },
  738. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x72) },
  739. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x73) },
  740. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x74) },
  741. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x75) },
  742. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x78) },
  743. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x79) },
  744. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x7A) },
  745. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x7B) },
  746. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x7C) },
  747. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x01) },
  748. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x02) },
  749. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x03) },
  750. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x04) },
  751. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x05) },
  752. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x06) },
  753. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0A) },
  754. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0B) },
  755. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0D) },
  756. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0E) },
  757. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0F) },
  758. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x10) },
  759. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x12) },
  760. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x13) },
  761. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x14) },
  762. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x15) },
  763. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x17) },
  764. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x18) },
  765. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x19) },
  766. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x1A) },
  767. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x1B) },
  768. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x1C) },
  769. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x31) },
  770. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x32) },
  771. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x33) },
  772. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x34) },
  773. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x35) },
  774. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x36) },
  775. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3A) },
  776. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3B) },
  777. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3D) },
  778. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3E) },
  779. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3F) },
  780. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x48) },
  781. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x49) },
  782. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x4A) },
  783. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x4B) },
  784. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x4C) },
  785. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x61) },
  786. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x62) },
  787. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x63) },
  788. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x64) },
  789. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x65) },
  790. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x66) },
  791. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6A) },
  792. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6B) },
  793. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6D) },
  794. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6E) },
  795. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6F) },
  796. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x72) },
  797. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x73) },
  798. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x74) },
  799. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x75) },
  800. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x78) },
  801. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x79) },
  802. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x7A) },
  803. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x7B) },
  804. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x7C) },
  805. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x01) },
  806. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x02) },
  807. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x03) },
  808. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x04) },
  809. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x05) },
  810. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x06) },
  811. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0A) },
  812. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0B) },
  813. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0D) },
  814. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0E) },
  815. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0F) },
  816. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x10) },
  817. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x12) },
  818. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x13) },
  819. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x14) },
  820. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x15) },
  821. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x17) },
  822. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x18) },
  823. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x19) },
  824. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x1A) },
  825. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x1B) },
  826. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x1C) },
  827. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x31) },
  828. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x32) },
  829. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x33) },
  830. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x34) },
  831. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x35) },
  832. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x36) },
  833. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3A) },
  834. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3B) },
  835. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3D) },
  836. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3E) },
  837. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3F) },
  838. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x48) },
  839. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x49) },
  840. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x4A) },
  841. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x4B) },
  842. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x4C) },
  843. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x61) },
  844. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x62) },
  845. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x63) },
  846. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x64) },
  847. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x65) },
  848. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x66) },
  849. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6A) },
  850. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6B) },
  851. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6D) },
  852. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6E) },
  853. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6F) },
  854. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x72) },
  855. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x73) },
  856. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x74) },
  857. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x75) },
  858. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x78) },
  859. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x79) },
  860. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x7A) },
  861. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x7B) },
  862. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x7C) },
  863. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x01) },
  864. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x02) },
  865. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x03) },
  866. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x04) },
  867. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x05) },
  868. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x06) },
  869. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0A) },
  870. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0B) },
  871. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0D) },
  872. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0E) },
  873. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0F) },
  874. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x10) },
  875. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x12) },
  876. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x13) },
  877. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x14) },
  878. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x15) },
  879. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x17) },
  880. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x18) },
  881. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x19) },
  882. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x1A) },
  883. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x1B) },
  884. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x1C) },
  885. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x31) },
  886. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x32) },
  887. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x33) },
  888. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x34) },
  889. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x35) },
  890. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x36) },
  891. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3A) },
  892. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3B) },
  893. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3D) },
  894. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3E) },
  895. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3F) },
  896. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x48) },
  897. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x49) },
  898. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x4A) },
  899. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x4B) },
  900. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x4C) },
  901. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x61) },
  902. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x62) },
  903. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x63) },
  904. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x64) },
  905. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x65) },
  906. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x66) },
  907. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6A) },
  908. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6B) },
  909. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6D) },
  910. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6E) },
  911. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6F) },
  912. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x72) },
  913. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x73) },
  914. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x74) },
  915. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x75) },
  916. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x78) },
  917. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x79) },
  918. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7A) },
  919. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7B) },
  920. { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7C) },
  921. /* Motorola devices */
  922. { USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x2a70, 0xff, 0xff, 0xff) }, /* mdm6600 */
  923. { USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x2e0a, 0xff, 0xff, 0xff) }, /* mdm9600 */
  924. { USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x4281, 0x0a, 0x00, 0xfc) }, /* mdm ram dl */
  925. { USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x900e, 0xff, 0xff, 0xff) }, /* mdm qc dl */
  926. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) },
  927. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) },
  928. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V740) },
  929. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V720) },
  930. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U730) },
  931. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U740) },
  932. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U870) },
  933. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_XU870) },
  934. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_X950D) },
  935. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EV620) },
  936. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_ES720) },
  937. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E725) },
  938. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_ES620) },
  939. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU730) },
  940. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU740) },
  941. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) },
  942. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) },
  943. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) },
  944. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_OVMC760) },
  945. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC780) },
  946. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED) },
  947. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED) },
  948. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED) },
  949. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED) },
  950. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_HIGHSPEED) },
  951. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED) },
  952. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED3) },
  953. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED4) },
  954. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED5) },
  955. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED6) },
  956. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED7) },
  957. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC996D) },
  958. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MF3470) },
  959. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC547) },
  960. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED) },
  961. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED) },
  962. { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G2) },
  963. /* Novatel Ovation MC551 a.k.a. Verizon USB551L */
  964. { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) },
  965. { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E362, 0xff, 0xff, 0xff) },
  966. { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E371, 0xff, 0xff, 0xff) },
  967. { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U620L, 0xff, 0x00, 0x00) },
  968. { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) },
  969. { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) },
  970. { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H02) },
  971. { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_SKYPEPHONE_S2) },
  972. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5700_MINICARD) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */
  973. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5500_MINICARD) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
  974. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5505_MINICARD) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
  975. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5700_EXPRESSCARD) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO ExpressCard == Novatel Merlin XV620 CDMA/EV-DO */
  976. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5510_EXPRESSCARD) }, /* Dell Wireless 5510 Mobile Broadband HSDPA ExpressCard == Novatel Merlin XU870 HSDPA/3G */
  977. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5700_MINICARD_SPRINT) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite E720 CDMA/EV-DO */
  978. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5700_MINICARD_TELUS) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite ET620 CDMA/EV-DO */
  979. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5720_MINICARD_VZW) }, /* Dell Wireless 5720 == Novatel EV620 CDMA/EV-DO */
  980. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5720_MINICARD_SPRINT) }, /* Dell Wireless 5720 == Novatel EV620 CDMA/EV-DO */
  981. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5720_MINICARD_TELUS) }, /* Dell Wireless 5720 == Novatel EV620 CDMA/EV-DO */
  982. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_CINGULAR) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */
  983. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_GENERIC_L) }, /* Dell Wireless HSDPA 5520 */
  984. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_GENERIC_I) }, /* Dell Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard */
  985. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_SPRINT) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */
  986. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_TELUS) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */
  987. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_VZW) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */
  988. { USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, DELL_PRODUCT_5800_MINICARD_VZW, 0xff, 0xff, 0xff) },
  989. { USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, DELL_PRODUCT_5800_V2_MINICARD_VZW, 0xff, 0xff, 0xff) },
  990. { USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, DELL_PRODUCT_5804_MINICARD_ATT, 0xff, 0xff, 0xff) },
  991. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5821E),
  992. .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
  993. { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5821E_ESIM),
  994. .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
  995. { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, /* ADU-E100, ADU-310 */
  996. { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) },
  997. { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) },
  998. { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) },
  999. { USB_DEVICE(YISO_VENDOR_ID, YISO_PRODUCT_U893) },
  1000. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1, 0xff) },
  1001. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2, 0xff) },
  1002. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1004, 0xff) },
  1003. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1005, 0xff) },
  1004. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1006, 0xff) },
  1005. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1007, 0xff) },
  1006. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1008, 0xff) },
  1007. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1009, 0xff) },
  1008. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_100A, 0xff) },
  1009. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_100B, 0xff) },
  1010. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_100C, 0xff) },
  1011. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_100D, 0xff) },
  1012. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_100E, 0xff) },
  1013. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_100F, 0xff) },
  1014. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1010, 0xff) },
  1015. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1011, 0xff) },
  1016. { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1012, 0xff) },
  1017. { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC650) },
  1018. { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
  1019. { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
  1020. { USB_DEVICE_AND_INTERFACE_INFO(QUALCOMM_VENDOR_ID, 0x6001, 0xff, 0xff, 0xff), /* 4G LTE usb-modem U901 */
  1021. .driver_info = RSVD(3) },
  1022. { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
  1023. { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
  1024. { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
  1025. .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
  1026. /* Quectel products using Qualcomm vendor ID */
  1027. { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
  1028. { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
  1029. .driver_info = RSVD(4) },
  1030. /* Yuga products use Qualcomm vendor ID */
  1031. { USB_DEVICE(QUALCOMM_VENDOR_ID, YUGA_PRODUCT_CLM920_NC5),
  1032. .driver_info = RSVD(1) | RSVD(4) },
  1033. /* u-blox products using Qualcomm vendor ID */
  1034. { USB_DEVICE(QUALCOMM_VENDOR_ID, UBLOX_PRODUCT_R410M),
  1035. .driver_info = RSVD(1) | RSVD(3) },
  1036. /* Quectel products using Quectel vendor ID */
  1037. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21, 0xff, 0xff, 0xff),
  1038. .driver_info = NUMEP2 },
  1039. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21, 0xff, 0, 0) },
  1040. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC25, 0xff, 0xff, 0xff),
  1041. .driver_info = NUMEP2 },
  1042. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC25, 0xff, 0, 0) },
  1043. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0xff, 0xff),
  1044. .driver_info = NUMEP2 },
  1045. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0, 0) },
  1046. { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
  1047. .driver_info = RSVD(4) },
  1048. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0xff, 0xff),
  1049. .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 },
  1050. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) },
  1051. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0xff, 0xff),
  1052. .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 },
  1053. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0, 0) },
  1054. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, 0x0620, 0xff, 0xff, 0x30) }, /* EM160R-GL */
  1055. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, 0x0620, 0xff, 0, 0) },
  1056. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x30) },
  1057. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0) },
  1058. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x10),
  1059. .driver_info = ZLP },
  1060. { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) },
  1061. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
  1062. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },
  1063. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003),
  1064. .driver_info = RSVD(0) },
  1065. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6004) },
  1066. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6005) },
  1067. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CGU_628A) },
  1068. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHE_628S),
  1069. .driver_info = RSVD(0) },
  1070. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_301),
  1071. .driver_info = RSVD(0) },
  1072. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_628),
  1073. .driver_info = RSVD(0) },
  1074. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_628S) },
  1075. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CDU_680) },
  1076. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CDU_685A) },
  1077. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_720S),
  1078. .driver_info = RSVD(0) },
  1079. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7002),
  1080. .driver_info = RSVD(0) },
  1081. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_629K),
  1082. .driver_info = RSVD(4) },
  1083. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7004),
  1084. .driver_info = RSVD(3) },
  1085. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7005) },
  1086. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CGU_629),
  1087. .driver_info = RSVD(5) },
  1088. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_629S),
  1089. .driver_info = RSVD(4) },
  1090. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_720I),
  1091. .driver_info = RSVD(0) },
  1092. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7212),
  1093. .driver_info = RSVD(0) },
  1094. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7213),
  1095. .driver_info = RSVD(0) },
  1096. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7251),
  1097. .driver_info = RSVD(1) },
  1098. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7252),
  1099. .driver_info = RSVD(1) },
  1100. { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7253),
  1101. .driver_info = RSVD(1) },
  1102. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
  1103. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) },
  1104. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_DUAL) },
  1105. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) },
  1106. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) },
  1107. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UE910_V2) },
  1108. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1031, 0xff), /* Telit LE910C1-EUX */
  1109. .driver_info = NCTRL(0) | RSVD(3) },
  1110. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1033, 0xff), /* Telit LE910C1-EUX (ECM) */
  1111. .driver_info = NCTRL(0) },
  1112. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG0),
  1113. .driver_info = RSVD(0) | RSVD(1) | NCTRL(2) | RSVD(3) },
  1114. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG1),
  1115. .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
  1116. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG2),
  1117. .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) | RSVD(3) },
  1118. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG3),
  1119. .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) | RSVD(3) },
  1120. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG5, 0xff),
  1121. .driver_info = RSVD(0) | RSVD(1) | NCTRL(2) | RSVD(3) },
  1122. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1050, 0xff), /* Telit FN980 (rmnet) */
  1123. .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
  1124. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1051, 0xff), /* Telit FN980 (MBIM) */
  1125. .driver_info = NCTRL(0) | RSVD(1) },
  1126. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1052, 0xff), /* Telit FN980 (RNDIS) */
  1127. .driver_info = NCTRL(2) | RSVD(3) },
  1128. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1053, 0xff), /* Telit FN980 (ECM) */
  1129. .driver_info = NCTRL(0) | RSVD(1) },
  1130. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1054, 0xff), /* Telit FT980-KS */
  1131. .driver_info = NCTRL(2) | RSVD(3) },
  1132. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1055, 0xff), /* Telit FN980 (PCIe) */
  1133. .driver_info = NCTRL(0) | RSVD(1) },
  1134. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910),
  1135. .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },
  1136. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
  1137. .driver_info = NCTRL(0) | RSVD(3) },
  1138. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1102, 0xff), /* Telit ME910 (ECM) */
  1139. .driver_info = NCTRL(0) },
  1140. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x110a, 0xff), /* Telit ME910G1 */
  1141. .driver_info = NCTRL(0) | RSVD(3) },
  1142. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x110b, 0xff), /* Telit ME910G1 (ECM) */
  1143. .driver_info = NCTRL(0) },
  1144. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910),
  1145. .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
  1146. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1203, 0xff), /* Telit LE910Cx (RNDIS) */
  1147. .driver_info = NCTRL(2) | RSVD(3) },
  1148. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910_USBCFG4),
  1149. .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) | RSVD(3) },
  1150. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920),
  1151. .driver_info = NCTRL(0) | RSVD(1) | RSVD(5) },
  1152. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1207) },
  1153. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1208),
  1154. .driver_info = NCTRL(0) | RSVD(1) },
  1155. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1211),
  1156. .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) | RSVD(3) },
  1157. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1212),
  1158. .driver_info = NCTRL(0) | RSVD(1) },
  1159. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1213, 0xff) },
  1160. { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1214),
  1161. .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) | RSVD(3) },
  1162. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1230, 0xff), /* Telit LE910Cx (rmnet) */
  1163. .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
  1164. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1231, 0xff), /* Telit LE910Cx (RNDIS) */
  1165. .driver_info = NCTRL(2) | RSVD(3) },
  1166. { USB_DEVICE(TELIT_VENDOR_ID, 0x1260),
  1167. .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
  1168. { USB_DEVICE(TELIT_VENDOR_ID, 0x1261),
  1169. .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
  1170. { USB_DEVICE(TELIT_VENDOR_ID, 0x1900), /* Telit LN940 (QMI) */
  1171. .driver_info = NCTRL(0) | RSVD(1) },
  1172. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1901, 0xff), /* Telit LN940 (MBIM) */
  1173. .driver_info = NCTRL(0) },
  1174. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x7010, 0xff), /* Telit LE910-S1 (RNDIS) */
  1175. .driver_info = NCTRL(2) },
  1176. { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x7011, 0xff), /* Telit LE910-S1 (ECM) */
  1177. .driver_info = NCTRL(2) },
  1178. { USB_DEVICE(TELIT_VENDOR_ID, 0x9010), /* Telit SBL FN980 flashing device */
  1179. .driver_info = NCTRL(0) | ZLP },
  1180. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
  1181. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff),
  1182. .driver_info = RSVD(1) },
  1183. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0003, 0xff, 0xff, 0xff) },
  1184. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0004, 0xff, 0xff, 0xff) },
  1185. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0005, 0xff, 0xff, 0xff) },
  1186. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0006, 0xff, 0xff, 0xff) },
  1187. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0008, 0xff, 0xff, 0xff) },
  1188. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0009, 0xff, 0xff, 0xff) },
  1189. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000a, 0xff, 0xff, 0xff) },
  1190. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000b, 0xff, 0xff, 0xff) },
  1191. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000c, 0xff, 0xff, 0xff) },
  1192. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000d, 0xff, 0xff, 0xff) },
  1193. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000e, 0xff, 0xff, 0xff) },
  1194. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000f, 0xff, 0xff, 0xff) },
  1195. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0010, 0xff, 0xff, 0xff) },
  1196. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0011, 0xff, 0xff, 0xff) },
  1197. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff),
  1198. .driver_info = RSVD(1) },
  1199. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) },
  1200. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) },
  1201. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) },
  1202. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff),
  1203. .driver_info = RSVD(3) },
  1204. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0018, 0xff, 0xff, 0xff) },
  1205. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff),
  1206. .driver_info = RSVD(3) },
  1207. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0020, 0xff, 0xff, 0xff) },
  1208. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0021, 0xff, 0xff, 0xff),
  1209. .driver_info = RSVD(4) },
  1210. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0022, 0xff, 0xff, 0xff) },
  1211. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0023, 0xff, 0xff, 0xff) },
  1212. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) },
  1213. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff),
  1214. .driver_info = RSVD(1) },
  1215. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) },
  1216. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) },
  1217. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) },
  1218. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, 0xff, 0xff, 0xff),
  1219. .driver_info = NCTRL(0) | NCTRL(1) | RSVD(4) },
  1220. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0032, 0xff, 0xff, 0xff) },
  1221. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0033, 0xff, 0xff, 0xff) },
  1222. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0034, 0xff, 0xff, 0xff) },
  1223. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0037, 0xff, 0xff, 0xff),
  1224. .driver_info = NCTRL(0) | NCTRL(1) },
  1225. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0038, 0xff, 0xff, 0xff) },
  1226. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0039, 0xff, 0xff, 0xff) },
  1227. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0040, 0xff, 0xff, 0xff) },
  1228. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0042, 0xff, 0xff, 0xff),
  1229. .driver_info = RSVD(4) },
  1230. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0043, 0xff, 0xff, 0xff) },
  1231. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0044, 0xff, 0xff, 0xff) },
  1232. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0048, 0xff, 0xff, 0xff) },
  1233. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0049, 0xff, 0xff, 0xff),
  1234. .driver_info = RSVD(5) },
  1235. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0050, 0xff, 0xff, 0xff) },
  1236. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) },
  1237. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff),
  1238. .driver_info = RSVD(4) },
  1239. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) },
  1240. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff),
  1241. .driver_info = RSVD(1) },
  1242. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0056, 0xff, 0xff, 0xff) },
  1243. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) },
  1244. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff),
  1245. .driver_info = RSVD(4) },
  1246. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) },
  1247. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) },
  1248. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff),
  1249. .driver_info = RSVD(4) },
  1250. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0064, 0xff, 0xff, 0xff) },
  1251. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0065, 0xff, 0xff, 0xff) },
  1252. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) },
  1253. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0067, 0xff, 0xff, 0xff) },
  1254. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0069, 0xff, 0xff, 0xff) },
  1255. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0076, 0xff, 0xff, 0xff) },
  1256. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0077, 0xff, 0xff, 0xff) },
  1257. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0078, 0xff, 0xff, 0xff) },
  1258. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0079, 0xff, 0xff, 0xff) },
  1259. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0082, 0xff, 0xff, 0xff) },
  1260. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0083, 0xff, 0xff, 0xff) },
  1261. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0086, 0xff, 0xff, 0xff) },
  1262. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0087, 0xff, 0xff, 0xff) },
  1263. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0088, 0xff, 0xff, 0xff) },
  1264. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0089, 0xff, 0xff, 0xff) },
  1265. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0090, 0xff, 0xff, 0xff) },
  1266. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0091, 0xff, 0xff, 0xff) },
  1267. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0092, 0xff, 0xff, 0xff) },
  1268. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0093, 0xff, 0xff, 0xff) },
  1269. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0094, 0xff, 0xff, 0xff) },
  1270. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0095, 0xff, 0xff, 0xff) },
  1271. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0096, 0xff, 0xff, 0xff) },
  1272. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0097, 0xff, 0xff, 0xff) },
  1273. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff),
  1274. .driver_info = RSVD(4) },
  1275. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0105, 0xff, 0xff, 0xff) },
  1276. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0106, 0xff, 0xff, 0xff) },
  1277. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0108, 0xff, 0xff, 0xff) },
  1278. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0113, 0xff, 0xff, 0xff),
  1279. .driver_info = RSVD(5) },
  1280. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0117, 0xff, 0xff, 0xff) },
  1281. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0118, 0xff, 0xff, 0xff),
  1282. .driver_info = RSVD(5) },
  1283. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0121, 0xff, 0xff, 0xff),
  1284. .driver_info = RSVD(5) },
  1285. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0122, 0xff, 0xff, 0xff) },
  1286. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0123, 0xff, 0xff, 0xff),
  1287. .driver_info = RSVD(4) },
  1288. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0124, 0xff, 0xff, 0xff),
  1289. .driver_info = RSVD(5) },
  1290. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0125, 0xff, 0xff, 0xff),
  1291. .driver_info = RSVD(6) },
  1292. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0126, 0xff, 0xff, 0xff),
  1293. .driver_info = RSVD(5) },
  1294. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0128, 0xff, 0xff, 0xff) },
  1295. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0135, 0xff, 0xff, 0xff) },
  1296. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0136, 0xff, 0xff, 0xff) },
  1297. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0137, 0xff, 0xff, 0xff) },
  1298. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0139, 0xff, 0xff, 0xff) },
  1299. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0142, 0xff, 0xff, 0xff) },
  1300. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0143, 0xff, 0xff, 0xff) },
  1301. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0144, 0xff, 0xff, 0xff) },
  1302. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0145, 0xff, 0xff, 0xff) },
  1303. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0148, 0xff, 0xff, 0xff) },
  1304. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0151, 0xff, 0xff, 0xff) },
  1305. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0153, 0xff, 0xff, 0xff) },
  1306. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0155, 0xff, 0xff, 0xff) },
  1307. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0156, 0xff, 0xff, 0xff) },
  1308. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0157, 0xff, 0xff, 0xff),
  1309. .driver_info = RSVD(5) },
  1310. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0158, 0xff, 0xff, 0xff),
  1311. .driver_info = RSVD(3) },
  1312. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0159, 0xff, 0xff, 0xff) },
  1313. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0161, 0xff, 0xff, 0xff) },
  1314. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0162, 0xff, 0xff, 0xff) },
  1315. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0164, 0xff, 0xff, 0xff) },
  1316. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) },
  1317. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0167, 0xff, 0xff, 0xff),
  1318. .driver_info = RSVD(4) },
  1319. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0189, 0xff, 0xff, 0xff) },
  1320. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0191, 0xff, 0xff, 0xff), /* ZTE EuFi890 */
  1321. .driver_info = RSVD(4) },
  1322. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0196, 0xff, 0xff, 0xff) },
  1323. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0197, 0xff, 0xff, 0xff) },
  1324. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0199, 0xff, 0xff, 0xff), /* ZTE MF820S */
  1325. .driver_info = RSVD(1) },
  1326. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0200, 0xff, 0xff, 0xff) },
  1327. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0201, 0xff, 0xff, 0xff) },
  1328. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0254, 0xff, 0xff, 0xff) },
  1329. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0257, 0xff, 0xff, 0xff), /* ZTE MF821 */
  1330. .driver_info = RSVD(3) },
  1331. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0265, 0xff, 0xff, 0xff), /* ONDA MT8205 */
  1332. .driver_info = RSVD(4) },
  1333. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0284, 0xff, 0xff, 0xff), /* ZTE MF880 */
  1334. .driver_info = RSVD(4) },
  1335. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0317, 0xff, 0xff, 0xff) },
  1336. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0326, 0xff, 0xff, 0xff),
  1337. .driver_info = RSVD(4) },
  1338. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0330, 0xff, 0xff, 0xff) },
  1339. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0395, 0xff, 0xff, 0xff) },
  1340. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0412, 0xff, 0xff, 0xff), /* Telewell TW-LTE 4G */
  1341. .driver_info = RSVD(4) },
  1342. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0414, 0xff, 0xff, 0xff) },
  1343. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0417, 0xff, 0xff, 0xff) },
  1344. { USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x0601, 0xff) }, /* GosunCn ZTE WeLink ME3630 (RNDIS mode) */
  1345. { USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x0602, 0xff) }, /* GosunCn ZTE WeLink ME3630 (MBIM mode) */
  1346. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff),
  1347. .driver_info = RSVD(4) },
  1348. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff),
  1349. .driver_info = RSVD(4) },
  1350. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff),
  1351. .driver_info = RSVD(4) },
  1352. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1018, 0xff, 0xff, 0xff) },
  1353. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1021, 0xff, 0xff, 0xff),
  1354. .driver_info = RSVD(2) },
  1355. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1057, 0xff, 0xff, 0xff) },
  1356. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1058, 0xff, 0xff, 0xff) },
  1357. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1059, 0xff, 0xff, 0xff) },
  1358. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1060, 0xff, 0xff, 0xff) },
  1359. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1061, 0xff, 0xff, 0xff) },
  1360. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1062, 0xff, 0xff, 0xff) },
  1361. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1063, 0xff, 0xff, 0xff) },
  1362. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1064, 0xff, 0xff, 0xff) },
  1363. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1065, 0xff, 0xff, 0xff) },
  1364. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1066, 0xff, 0xff, 0xff) },
  1365. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1067, 0xff, 0xff, 0xff) },
  1366. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1068, 0xff, 0xff, 0xff) },
  1367. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1069, 0xff, 0xff, 0xff) },
  1368. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1070, 0xff, 0xff, 0xff) },
  1369. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1071, 0xff, 0xff, 0xff) },
  1370. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1072, 0xff, 0xff, 0xff) },
  1371. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1073, 0xff, 0xff, 0xff) },
  1372. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1074, 0xff, 0xff, 0xff) },
  1373. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1075, 0xff, 0xff, 0xff) },
  1374. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1076, 0xff, 0xff, 0xff) },
  1375. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1077, 0xff, 0xff, 0xff) },
  1376. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1078, 0xff, 0xff, 0xff) },
  1377. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1079, 0xff, 0xff, 0xff) },
  1378. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1080, 0xff, 0xff, 0xff) },
  1379. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1081, 0xff, 0xff, 0xff) },
  1380. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1082, 0xff, 0xff, 0xff) },
  1381. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1083, 0xff, 0xff, 0xff) },
  1382. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1084, 0xff, 0xff, 0xff) },
  1383. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1085, 0xff, 0xff, 0xff) },
  1384. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1086, 0xff, 0xff, 0xff) },
  1385. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1087, 0xff, 0xff, 0xff) },
  1386. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1088, 0xff, 0xff, 0xff) },
  1387. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1089, 0xff, 0xff, 0xff) },
  1388. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1090, 0xff, 0xff, 0xff) },
  1389. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1091, 0xff, 0xff, 0xff) },
  1390. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1092, 0xff, 0xff, 0xff) },
  1391. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1093, 0xff, 0xff, 0xff) },
  1392. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1094, 0xff, 0xff, 0xff) },
  1393. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1095, 0xff, 0xff, 0xff) },
  1394. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1096, 0xff, 0xff, 0xff) },
  1395. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1097, 0xff, 0xff, 0xff) },
  1396. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1098, 0xff, 0xff, 0xff) },
  1397. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1099, 0xff, 0xff, 0xff) },
  1398. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1100, 0xff, 0xff, 0xff) },
  1399. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1101, 0xff, 0xff, 0xff) },
  1400. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1102, 0xff, 0xff, 0xff) },
  1401. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1103, 0xff, 0xff, 0xff) },
  1402. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1104, 0xff, 0xff, 0xff) },
  1403. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1105, 0xff, 0xff, 0xff) },
  1404. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1106, 0xff, 0xff, 0xff) },
  1405. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1107, 0xff, 0xff, 0xff) },
  1406. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1108, 0xff, 0xff, 0xff) },
  1407. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1109, 0xff, 0xff, 0xff) },
  1408. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1110, 0xff, 0xff, 0xff) },
  1409. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1111, 0xff, 0xff, 0xff) },
  1410. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1112, 0xff, 0xff, 0xff) },
  1411. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1113, 0xff, 0xff, 0xff) },
  1412. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1114, 0xff, 0xff, 0xff) },
  1413. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1115, 0xff, 0xff, 0xff) },
  1414. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1116, 0xff, 0xff, 0xff) },
  1415. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1117, 0xff, 0xff, 0xff) },
  1416. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1118, 0xff, 0xff, 0xff) },
  1417. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1119, 0xff, 0xff, 0xff) },
  1418. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1120, 0xff, 0xff, 0xff) },
  1419. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1121, 0xff, 0xff, 0xff) },
  1420. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1122, 0xff, 0xff, 0xff) },
  1421. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1123, 0xff, 0xff, 0xff) },
  1422. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1124, 0xff, 0xff, 0xff) },
  1423. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1125, 0xff, 0xff, 0xff) },
  1424. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1126, 0xff, 0xff, 0xff) },
  1425. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1127, 0xff, 0xff, 0xff) },
  1426. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1128, 0xff, 0xff, 0xff) },
  1427. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1129, 0xff, 0xff, 0xff) },
  1428. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1130, 0xff, 0xff, 0xff) },
  1429. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1131, 0xff, 0xff, 0xff) },
  1430. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1132, 0xff, 0xff, 0xff) },
  1431. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1133, 0xff, 0xff, 0xff) },
  1432. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1134, 0xff, 0xff, 0xff) },
  1433. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1135, 0xff, 0xff, 0xff) },
  1434. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1136, 0xff, 0xff, 0xff) },
  1435. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1137, 0xff, 0xff, 0xff) },
  1436. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1138, 0xff, 0xff, 0xff) },
  1437. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1139, 0xff, 0xff, 0xff) },
  1438. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1140, 0xff, 0xff, 0xff) },
  1439. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1141, 0xff, 0xff, 0xff) },
  1440. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1142, 0xff, 0xff, 0xff) },
  1441. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1143, 0xff, 0xff, 0xff) },
  1442. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1144, 0xff, 0xff, 0xff) },
  1443. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1145, 0xff, 0xff, 0xff) },
  1444. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1146, 0xff, 0xff, 0xff) },
  1445. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1147, 0xff, 0xff, 0xff) },
  1446. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1148, 0xff, 0xff, 0xff) },
  1447. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1149, 0xff, 0xff, 0xff) },
  1448. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1150, 0xff, 0xff, 0xff) },
  1449. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1151, 0xff, 0xff, 0xff) },
  1450. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1152, 0xff, 0xff, 0xff) },
  1451. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1153, 0xff, 0xff, 0xff) },
  1452. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1154, 0xff, 0xff, 0xff) },
  1453. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1155, 0xff, 0xff, 0xff) },
  1454. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1156, 0xff, 0xff, 0xff) },
  1455. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1157, 0xff, 0xff, 0xff) },
  1456. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1158, 0xff, 0xff, 0xff) },
  1457. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1159, 0xff, 0xff, 0xff) },
  1458. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1160, 0xff, 0xff, 0xff) },
  1459. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1161, 0xff, 0xff, 0xff) },
  1460. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1162, 0xff, 0xff, 0xff) },
  1461. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1163, 0xff, 0xff, 0xff) },
  1462. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1164, 0xff, 0xff, 0xff) },
  1463. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1165, 0xff, 0xff, 0xff) },
  1464. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1166, 0xff, 0xff, 0xff) },
  1465. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1167, 0xff, 0xff, 0xff) },
  1466. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1168, 0xff, 0xff, 0xff) },
  1467. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1169, 0xff, 0xff, 0xff) },
  1468. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1170, 0xff, 0xff, 0xff) },
  1469. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1244, 0xff, 0xff, 0xff) },
  1470. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1245, 0xff, 0xff, 0xff),
  1471. .driver_info = RSVD(4) },
  1472. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1246, 0xff, 0xff, 0xff) },
  1473. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1247, 0xff, 0xff, 0xff),
  1474. .driver_info = RSVD(4) },
  1475. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1248, 0xff, 0xff, 0xff) },
  1476. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1249, 0xff, 0xff, 0xff) },
  1477. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1250, 0xff, 0xff, 0xff) },
  1478. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1251, 0xff, 0xff, 0xff) },
  1479. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1252, 0xff, 0xff, 0xff),
  1480. .driver_info = RSVD(4) },
  1481. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1253, 0xff, 0xff, 0xff) },
  1482. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1254, 0xff, 0xff, 0xff),
  1483. .driver_info = RSVD(4) },
  1484. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1255, 0xff, 0xff, 0xff),
  1485. .driver_info = RSVD(3) | RSVD(4) },
  1486. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1256, 0xff, 0xff, 0xff),
  1487. .driver_info = RSVD(4) },
  1488. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1257, 0xff, 0xff, 0xff) },
  1489. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1258, 0xff, 0xff, 0xff) },
  1490. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1259, 0xff, 0xff, 0xff) },
  1491. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1260, 0xff, 0xff, 0xff) },
  1492. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1261, 0xff, 0xff, 0xff) },
  1493. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1262, 0xff, 0xff, 0xff) },
  1494. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1263, 0xff, 0xff, 0xff) },
  1495. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1264, 0xff, 0xff, 0xff) },
  1496. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1265, 0xff, 0xff, 0xff) },
  1497. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1266, 0xff, 0xff, 0xff) },
  1498. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1267, 0xff, 0xff, 0xff) },
  1499. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1268, 0xff, 0xff, 0xff) },
  1500. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1269, 0xff, 0xff, 0xff) },
  1501. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1270, 0xff, 0xff, 0xff),
  1502. .driver_info = RSVD(5) },
  1503. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1271, 0xff, 0xff, 0xff) },
  1504. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1272, 0xff, 0xff, 0xff) },
  1505. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1273, 0xff, 0xff, 0xff) },
  1506. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1274, 0xff, 0xff, 0xff) },
  1507. { USB_DEVICE(ZTE_VENDOR_ID, 0x1275), /* ZTE P685M */
  1508. .driver_info = RSVD(3) | RSVD(4) },
  1509. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1276, 0xff, 0xff, 0xff) },
  1510. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1277, 0xff, 0xff, 0xff) },
  1511. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1278, 0xff, 0xff, 0xff) },
  1512. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1279, 0xff, 0xff, 0xff) },
  1513. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1280, 0xff, 0xff, 0xff) },
  1514. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1281, 0xff, 0xff, 0xff) },
  1515. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1282, 0xff, 0xff, 0xff) },
  1516. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1283, 0xff, 0xff, 0xff) },
  1517. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1284, 0xff, 0xff, 0xff) },
  1518. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1285, 0xff, 0xff, 0xff) },
  1519. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1286, 0xff, 0xff, 0xff) },
  1520. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1287, 0xff, 0xff, 0xff) },
  1521. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1288, 0xff, 0xff, 0xff) },
  1522. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1289, 0xff, 0xff, 0xff) },
  1523. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1290, 0xff, 0xff, 0xff) },
  1524. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1291, 0xff, 0xff, 0xff) },
  1525. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1292, 0xff, 0xff, 0xff) },
  1526. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1293, 0xff, 0xff, 0xff) },
  1527. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1294, 0xff, 0xff, 0xff) },
  1528. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1295, 0xff, 0xff, 0xff) },
  1529. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1296, 0xff, 0xff, 0xff) },
  1530. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1297, 0xff, 0xff, 0xff) },
  1531. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1298, 0xff, 0xff, 0xff) },
  1532. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1299, 0xff, 0xff, 0xff) },
  1533. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1300, 0xff, 0xff, 0xff) },
  1534. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1301, 0xff, 0xff, 0xff) },
  1535. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1302, 0xff, 0xff, 0xff) },
  1536. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1303, 0xff, 0xff, 0xff) },
  1537. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1333, 0xff, 0xff, 0xff) },
  1538. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1401, 0xff, 0xff, 0xff),
  1539. .driver_info = RSVD(2) },
  1540. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1402, 0xff, 0xff, 0xff),
  1541. .driver_info = RSVD(2) },
  1542. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1424, 0xff, 0xff, 0xff),
  1543. .driver_info = RSVD(2) },
  1544. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1425, 0xff, 0xff, 0xff),
  1545. .driver_info = RSVD(2) },
  1546. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1426, 0xff, 0xff, 0xff), /* ZTE MF91 */
  1547. .driver_info = RSVD(2) },
  1548. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff), /* Telewell TW-LTE 4G v2 */
  1549. .driver_info = RSVD(2) },
  1550. { USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1476, 0xff) }, /* GosunCn ZTE WeLink ME3630 (ECM/NCM mode) */
  1551. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1481, 0xff, 0x00, 0x00) }, /* ZTE MF871A */
  1552. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) },
  1553. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) },
  1554. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },
  1555. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1545, 0xff, 0xff, 0xff) },
  1556. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1546, 0xff, 0xff, 0xff) },
  1557. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1547, 0xff, 0xff, 0xff) },
  1558. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1565, 0xff, 0xff, 0xff) },
  1559. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1566, 0xff, 0xff, 0xff) },
  1560. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1567, 0xff, 0xff, 0xff) },
  1561. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1589, 0xff, 0xff, 0xff) },
  1562. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1590, 0xff, 0xff, 0xff) },
  1563. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1591, 0xff, 0xff, 0xff) },
  1564. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1592, 0xff, 0xff, 0xff) },
  1565. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1594, 0xff, 0xff, 0xff) },
  1566. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1596, 0xff, 0xff, 0xff) },
  1567. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1598, 0xff, 0xff, 0xff) },
  1568. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1600, 0xff, 0xff, 0xff) },
  1569. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 0xff, 0xff),
  1570. .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | RSVD(4) },
  1571. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) },
  1572. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, /* ZTE CDMA products */
  1573. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0027, 0xff, 0xff, 0xff) },
  1574. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) },
  1575. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0060, 0xff, 0xff, 0xff) },
  1576. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) },
  1577. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) },
  1578. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0094, 0xff, 0xff, 0xff) },
  1579. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff),
  1580. .driver_info = RSVD(1) },
  1581. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0133, 0xff, 0xff, 0xff),
  1582. .driver_info = RSVD(3) },
  1583. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff),
  1584. .driver_info = RSVD(5) },
  1585. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0147, 0xff, 0xff, 0xff) },
  1586. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0152, 0xff, 0xff, 0xff) },
  1587. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0168, 0xff, 0xff, 0xff),
  1588. .driver_info = RSVD(4) },
  1589. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0170, 0xff, 0xff, 0xff) },
  1590. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0176, 0xff, 0xff, 0xff),
  1591. .driver_info = RSVD(3) },
  1592. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff),
  1593. .driver_info = RSVD(3) },
  1594. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff42, 0xff, 0xff, 0xff) },
  1595. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff43, 0xff, 0xff, 0xff) },
  1596. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff44, 0xff, 0xff, 0xff) },
  1597. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff45, 0xff, 0xff, 0xff) },
  1598. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff46, 0xff, 0xff, 0xff) },
  1599. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff47, 0xff, 0xff, 0xff) },
  1600. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff48, 0xff, 0xff, 0xff) },
  1601. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff49, 0xff, 0xff, 0xff) },
  1602. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff4a, 0xff, 0xff, 0xff) },
  1603. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff4b, 0xff, 0xff, 0xff) },
  1604. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff4c, 0xff, 0xff, 0xff) },
  1605. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff4d, 0xff, 0xff, 0xff) },
  1606. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff4e, 0xff, 0xff, 0xff) },
  1607. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff4f, 0xff, 0xff, 0xff) },
  1608. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff50, 0xff, 0xff, 0xff) },
  1609. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff51, 0xff, 0xff, 0xff) },
  1610. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff52, 0xff, 0xff, 0xff) },
  1611. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff53, 0xff, 0xff, 0xff) },
  1612. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff54, 0xff, 0xff, 0xff) },
  1613. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff55, 0xff, 0xff, 0xff) },
  1614. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff56, 0xff, 0xff, 0xff) },
  1615. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff57, 0xff, 0xff, 0xff) },
  1616. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff58, 0xff, 0xff, 0xff) },
  1617. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff59, 0xff, 0xff, 0xff) },
  1618. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff5a, 0xff, 0xff, 0xff) },
  1619. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff5b, 0xff, 0xff, 0xff) },
  1620. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff5c, 0xff, 0xff, 0xff) },
  1621. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff5d, 0xff, 0xff, 0xff) },
  1622. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff5e, 0xff, 0xff, 0xff) },
  1623. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff5f, 0xff, 0xff, 0xff) },
  1624. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff60, 0xff, 0xff, 0xff) },
  1625. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff61, 0xff, 0xff, 0xff) },
  1626. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff62, 0xff, 0xff, 0xff) },
  1627. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff63, 0xff, 0xff, 0xff) },
  1628. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff64, 0xff, 0xff, 0xff) },
  1629. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff65, 0xff, 0xff, 0xff) },
  1630. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff66, 0xff, 0xff, 0xff) },
  1631. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff67, 0xff, 0xff, 0xff) },
  1632. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff68, 0xff, 0xff, 0xff) },
  1633. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff69, 0xff, 0xff, 0xff) },
  1634. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff6a, 0xff, 0xff, 0xff) },
  1635. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff6b, 0xff, 0xff, 0xff) },
  1636. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff6c, 0xff, 0xff, 0xff) },
  1637. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff6d, 0xff, 0xff, 0xff) },
  1638. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff6e, 0xff, 0xff, 0xff) },
  1639. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff6f, 0xff, 0xff, 0xff) },
  1640. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff70, 0xff, 0xff, 0xff) },
  1641. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff71, 0xff, 0xff, 0xff) },
  1642. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff72, 0xff, 0xff, 0xff) },
  1643. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff73, 0xff, 0xff, 0xff) },
  1644. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff74, 0xff, 0xff, 0xff) },
  1645. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff75, 0xff, 0xff, 0xff) },
  1646. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff76, 0xff, 0xff, 0xff) },
  1647. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff77, 0xff, 0xff, 0xff) },
  1648. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff78, 0xff, 0xff, 0xff) },
  1649. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff79, 0xff, 0xff, 0xff) },
  1650. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff7a, 0xff, 0xff, 0xff) },
  1651. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff7b, 0xff, 0xff, 0xff) },
  1652. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff7c, 0xff, 0xff, 0xff) },
  1653. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff7d, 0xff, 0xff, 0xff) },
  1654. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff7e, 0xff, 0xff, 0xff) },
  1655. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff7f, 0xff, 0xff, 0xff) },
  1656. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff80, 0xff, 0xff, 0xff) },
  1657. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff81, 0xff, 0xff, 0xff) },
  1658. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff82, 0xff, 0xff, 0xff) },
  1659. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff83, 0xff, 0xff, 0xff) },
  1660. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff84, 0xff, 0xff, 0xff) },
  1661. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff85, 0xff, 0xff, 0xff) },
  1662. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff86, 0xff, 0xff, 0xff) },
  1663. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff87, 0xff, 0xff, 0xff) },
  1664. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff88, 0xff, 0xff, 0xff) },
  1665. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff89, 0xff, 0xff, 0xff) },
  1666. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8a, 0xff, 0xff, 0xff) },
  1667. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8b, 0xff, 0xff, 0xff) },
  1668. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8c, 0xff, 0xff, 0xff) },
  1669. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8d, 0xff, 0xff, 0xff) },
  1670. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8e, 0xff, 0xff, 0xff) },
  1671. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8f, 0xff, 0xff, 0xff) },
  1672. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff90, 0xff, 0xff, 0xff) },
  1673. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff91, 0xff, 0xff, 0xff) },
  1674. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff92, 0xff, 0xff, 0xff) },
  1675. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff93, 0xff, 0xff, 0xff) },
  1676. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff94, 0xff, 0xff, 0xff) },
  1677. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff9f, 0xff, 0xff, 0xff) },
  1678. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa0, 0xff, 0xff, 0xff) },
  1679. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa1, 0xff, 0xff, 0xff) },
  1680. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa2, 0xff, 0xff, 0xff) },
  1681. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa3, 0xff, 0xff, 0xff) },
  1682. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa4, 0xff, 0xff, 0xff) },
  1683. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa5, 0xff, 0xff, 0xff) },
  1684. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa6, 0xff, 0xff, 0xff) },
  1685. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa7, 0xff, 0xff, 0xff) },
  1686. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa8, 0xff, 0xff, 0xff) },
  1687. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa9, 0xff, 0xff, 0xff) },
  1688. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffaa, 0xff, 0xff, 0xff) },
  1689. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffab, 0xff, 0xff, 0xff) },
  1690. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffac, 0xff, 0xff, 0xff) },
  1691. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffae, 0xff, 0xff, 0xff) },
  1692. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffaf, 0xff, 0xff, 0xff) },
  1693. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb0, 0xff, 0xff, 0xff) },
  1694. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb1, 0xff, 0xff, 0xff) },
  1695. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb2, 0xff, 0xff, 0xff) },
  1696. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb3, 0xff, 0xff, 0xff) },
  1697. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb4, 0xff, 0xff, 0xff) },
  1698. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb5, 0xff, 0xff, 0xff) },
  1699. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb6, 0xff, 0xff, 0xff) },
  1700. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb7, 0xff, 0xff, 0xff) },
  1701. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb8, 0xff, 0xff, 0xff) },
  1702. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb9, 0xff, 0xff, 0xff) },
  1703. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffba, 0xff, 0xff, 0xff) },
  1704. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffbb, 0xff, 0xff, 0xff) },
  1705. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffbc, 0xff, 0xff, 0xff) },
  1706. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffbd, 0xff, 0xff, 0xff) },
  1707. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffbe, 0xff, 0xff, 0xff) },
  1708. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffbf, 0xff, 0xff, 0xff) },
  1709. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc0, 0xff, 0xff, 0xff) },
  1710. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc1, 0xff, 0xff, 0xff) },
  1711. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc2, 0xff, 0xff, 0xff) },
  1712. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc3, 0xff, 0xff, 0xff) },
  1713. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc4, 0xff, 0xff, 0xff) },
  1714. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc5, 0xff, 0xff, 0xff) },
  1715. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc6, 0xff, 0xff, 0xff) },
  1716. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc7, 0xff, 0xff, 0xff) },
  1717. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc8, 0xff, 0xff, 0xff) },
  1718. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc9, 0xff, 0xff, 0xff) },
  1719. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffca, 0xff, 0xff, 0xff) },
  1720. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffcb, 0xff, 0xff, 0xff) },
  1721. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffcc, 0xff, 0xff, 0xff) },
  1722. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffcd, 0xff, 0xff, 0xff) },
  1723. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffce, 0xff, 0xff, 0xff) },
  1724. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffcf, 0xff, 0xff, 0xff) },
  1725. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffd0, 0xff, 0xff, 0xff) },
  1726. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffd1, 0xff, 0xff, 0xff) },
  1727. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffd2, 0xff, 0xff, 0xff) },
  1728. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffd3, 0xff, 0xff, 0xff) },
  1729. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffd4, 0xff, 0xff, 0xff) },
  1730. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffd5, 0xff, 0xff, 0xff) },
  1731. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffe9, 0xff, 0xff, 0xff) },
  1732. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffec, 0xff, 0xff, 0xff) },
  1733. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffee, 0xff, 0xff, 0xff) },
  1734. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xfff6, 0xff, 0xff, 0xff) },
  1735. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xfff7, 0xff, 0xff, 0xff) },
  1736. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xfff8, 0xff, 0xff, 0xff) },
  1737. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xfff9, 0xff, 0xff, 0xff) },
  1738. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xfffb, 0xff, 0xff, 0xff) },
  1739. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xfffc, 0xff, 0xff, 0xff) },
  1740. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MG880, 0xff, 0xff, 0xff) },
  1741. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) },
  1742. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) },
  1743. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) },
  1744. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2718, 0xff, 0xff, 0xff),
  1745. .driver_info = NCTRL(1) | NCTRL(2) | NCTRL(3) | NCTRL(4) },
  1746. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AD3812, 0xff, 0xff, 0xff),
  1747. .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) },
  1748. { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2716, 0xff, 0xff, 0xff),
  1749. .driver_info = NCTRL(1) | NCTRL(2) | NCTRL(3) },
  1750. { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_L),
  1751. .driver_info = RSVD(3) | RSVD(4) | RSVD(5) },
  1752. { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_MBIM),
  1753. .driver_info = RSVD(2) | RSVD(3) | RSVD(4) },
  1754. { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_X),
  1755. .driver_info = RSVD(3) | RSVD(4) | RSVD(5) },
  1756. { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ZM8620_X),
  1757. .driver_info = RSVD(3) | RSVD(4) | RSVD(5) },
  1758. { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) },
  1759. { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) },
  1760. { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) },
  1761. { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) },
  1762. { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) },
  1763. { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */
  1764. { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5A) },
  1765. { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) },
  1766. { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) },
  1767. { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) },
  1768. { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4518) },
  1769. { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4519) },
  1770. { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_G450) },
  1771. { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */
  1772. { USB_DEVICE(ALINK_VENDOR_ID, 0x9000) },
  1773. { USB_DEVICE(ALINK_VENDOR_ID, ALINK_PRODUCT_PH300) },
  1774. { USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) },
  1775. //{ USB_DEVICE(ALINK_VENDOR_ID, SIMCOM_PRODUCT_SIM7100E),
  1776. // .driver_info = RSVD(5) | RSVD(6) },
  1777. { USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9003, 0xff) }, /* Simcom SIM7500/SIM7600 MBIM mode */
  1778. { USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9011, 0xff), /* Simcom SIM7500/SIM7600 RNDIS mode */
  1779. .driver_info = RSVD(7) },
  1780. { USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9205, 0xff) }, /* Simcom SIM7070/SIM7080/SIM7090 AT+ECM mode */
  1781. { USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9206, 0xff) }, /* Simcom SIM7070/SIM7080/SIM7090 AT-only mode */
  1782. { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200),
  1783. .driver_info = NCTRL(0) | NCTRL(1) | RSVD(4) },
  1784. { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X220_X500D),
  1785. .driver_info = RSVD(6) },
  1786. { USB_DEVICE(ALCATEL_VENDOR_ID, 0x0052),
  1787. .driver_info = RSVD(6) },
  1788. { USB_DEVICE(ALCATEL_VENDOR_ID, 0x00b6),
  1789. .driver_info = RSVD(3) },
  1790. { USB_DEVICE(ALCATEL_VENDOR_ID, 0x00b7),
  1791. .driver_info = RSVD(5) },
  1792. { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_L100V),
  1793. .driver_info = RSVD(4) },
  1794. { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_L800MA),
  1795. .driver_info = RSVD(2) },
  1796. { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) },
  1797. { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) },
  1798. { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14),
  1799. .driver_info = NCTRL(0) | NCTRL(1) },
  1800. { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W100),
  1801. .driver_info = NCTRL(1) | NCTRL(2) | RSVD(3) },
  1802. {USB_DEVICE(LONGCHEER_VENDOR_ID, FUJISOFT_PRODUCT_FS040U),
  1803. .driver_info = RSVD(3)},
  1804. { USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID, SPEEDUP_PRODUCT_SU9800, 0xff) },
  1805. { USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID, 0x9801, 0xff),
  1806. .driver_info = RSVD(3) },
  1807. { USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID, 0x9803, 0xff),
  1808. .driver_info = RSVD(4) },
  1809. { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) },
  1810. { USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) },
  1811. { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) },
  1812. { USB_DEVICE_AND_INTERFACE_INFO(HAIER_VENDOR_ID, HAIER_PRODUCT_CE81B, 0xff, 0xff, 0xff) },
  1813. /* Pirelli */
  1814. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1, 0xff) },
  1815. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_2, 0xff) },
  1816. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1004, 0xff) },
  1817. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1005, 0xff) },
  1818. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1006, 0xff) },
  1819. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1007, 0xff) },
  1820. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1008, 0xff) },
  1821. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1009, 0xff) },
  1822. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100A, 0xff) },
  1823. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100B, 0xff) },
  1824. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100C, 0xff) },
  1825. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100D, 0xff) },
  1826. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100E, 0xff) },
  1827. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100F, 0xff) },
  1828. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1011, 0xff) },
  1829. { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1012, 0xff) },
  1830. /* Cinterion */
  1831. { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_E) },
  1832. { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_P) },
  1833. { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8),
  1834. .driver_info = RSVD(4) },
  1835. { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX, 0xff) },
  1836. { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PLXX),
  1837. .driver_info = RSVD(4) },
  1838. { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8_2RMNET, 0xff),
  1839. .driver_info = RSVD(4) | RSVD(5) },
  1840. { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8_AUDIO, 0xff),
  1841. .driver_info = RSVD(4) },
  1842. { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX_2RMNET, 0xff) },
  1843. { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX_AUDIO, 0xff) },
  1844. { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_CLS8, 0xff),
  1845. .driver_info = RSVD(0) | RSVD(4) },
  1846. { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EXS82, 0xff) },
  1847. { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) },
  1848. { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) },
  1849. { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDM) },
  1850. { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDMNET) },
  1851. { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, /* HC28 enumerates with Siemens or Cinterion VID depending on FW revision */
  1852. { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) },
  1853. { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_MBIM, 0xff),
  1854. .driver_info = RSVD(3)},
  1855. { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_RMNET, 0xff),
  1856. .driver_info = RSVD(0)},
  1857. { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100),
  1858. .driver_info = RSVD(4) },
  1859. { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD120),
  1860. .driver_info = RSVD(4) },
  1861. { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD140),
  1862. .driver_info = RSVD(4) },
  1863. { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) },
  1864. { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD155),
  1865. .driver_info = RSVD(6) },
  1866. { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200),
  1867. .driver_info = RSVD(6) },
  1868. { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD160),
  1869. .driver_info = RSVD(6) },
  1870. { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD500),
  1871. .driver_info = RSVD(4) },
  1872. { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */
  1873. { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/
  1874. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) },
  1875. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM610) },
  1876. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM500) },
  1877. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM510) },
  1878. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM800) },
  1879. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM900) },
  1880. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU818) },
  1881. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU816) },
  1882. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU828) },
  1883. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU826) },
  1884. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU518) },
  1885. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU516) },
  1886. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU528) },
  1887. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU526) },
  1888. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM600) },
  1889. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM610) },
  1890. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM500) },
  1891. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM510) },
  1892. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM800) },
  1893. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM900) },
  1894. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU718) },
  1895. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU716) },
  1896. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU728) },
  1897. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU726) },
  1898. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU518) },
  1899. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU516) },
  1900. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU528) },
  1901. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU526) },
  1902. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM600) },
  1903. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM610) },
  1904. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM500) },
  1905. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM510) },
  1906. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM800) },
  1907. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM900) },
  1908. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU718) },
  1909. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU716) },
  1910. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU728) },
  1911. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU726) },
  1912. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU518) },
  1913. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU516) },
  1914. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU528) },
  1915. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU526) },
  1916. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU881) },
  1917. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU882) },
  1918. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU581) },
  1919. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU582) },
  1920. { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU583) },
  1921. { USB_DEVICE_AND_INTERFACE_INFO(VIETTEL_VENDOR_ID, VIETTEL_PRODUCT_VT1000, 0xff, 0xff, 0xff) },
  1922. { USB_DEVICE_AND_INTERFACE_INFO(ZD_VENDOR_ID, ZD_PRODUCT_7000, 0xff, 0xff, 0xff) },
  1923. { USB_DEVICE(LG_VENDOR_ID, LG_PRODUCT_L02C) }, /* docomo L-02C modem */
  1924. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a1, 0xff, 0x00, 0x00) },
  1925. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a1, 0xff, 0x02, 0x01) },
  1926. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x00, 0x00) },
  1927. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x02, 0x01) }, /* MediaTek MT6276M modem & app port */
  1928. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_1COM, 0x0a, 0x00, 0x00) },
  1929. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_5COM, 0xff, 0x02, 0x01) },
  1930. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_5COM, 0xff, 0x00, 0x00) },
  1931. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM, 0xff, 0x02, 0x01) },
  1932. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM, 0xff, 0x00, 0x00) },
  1933. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7208_1COM, 0x02, 0x00, 0x00) },
  1934. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7208_2COM, 0x02, 0x02, 0x01) },
  1935. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FP_1COM, 0x0a, 0x00, 0x00) },
  1936. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FP_2COM, 0x0a, 0x00, 0x00) },
  1937. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FPDC_1COM, 0x0a, 0x00, 0x00) },
  1938. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FPDC_2COM, 0x0a, 0x00, 0x00) },
  1939. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7103_2COM, 0xff, 0x00, 0x00) },
  1940. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7106_2COM, 0x02, 0x02, 0x01) },
  1941. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) },
  1942. { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) },
  1943. { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) },
  1944. { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MPL200),
  1945. .driver_info = RSVD(1) | RSVD(4) },
  1946. { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600A) },
  1947. { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600E) },
  1948. { USB_DEVICE_AND_INTERFACE_INFO(TPLINK_VENDOR_ID, TPLINK_PRODUCT_LTE, 0xff, 0x00, 0x00) }, /* TP-Link LTE Module */
  1949. { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180),
  1950. .driver_info = RSVD(4) },
  1951. { USB_DEVICE(TPLINK_VENDOR_ID, 0x9000), /* TP-Link MA260 */
  1952. .driver_info = RSVD(4) },
  1953. { USB_DEVICE(CHANGHONG_VENDOR_ID, CHANGHONG_PRODUCT_CH690) },
  1954. { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) }, /* D-Link DWM-156 (variant) */
  1955. { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) },
  1956. { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) },
  1957. { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff), /* D-Link DWM-158 */
  1958. .driver_info = RSVD(4) | RSVD(5) },
  1959. { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d0e, 0xff) }, /* D-Link DWM-157 C1 */
  1960. { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */
  1961. .driver_info = RSVD(4) },
  1962. { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e35, 0xff), /* D-Link DWM-222 */
  1963. .driver_info = RSVD(4) },
  1964. { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e3d, 0xff), /* D-Link DWM-222 A2 */
  1965. .driver_info = RSVD(4) },
  1966. { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */
  1967. { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */
  1968. { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x7e11, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/A3 */
  1969. { USB_DEVICE_INTERFACE_CLASS(0x1435, 0xd191, 0xff), /* Wistron Neweb D19Q1 */
  1970. .driver_info = RSVD(1) | RSVD(4) },
  1971. { USB_DEVICE_INTERFACE_CLASS(0x1690, 0x7588, 0xff), /* ASKEY WWHC050 */
  1972. .driver_info = RSVD(1) | RSVD(4) },
  1973. { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x2031, 0xff), /* Olicard 600 */
  1974. .driver_info = RSVD(4) },
  1975. { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x2033, 0xff), /* BroadMobi BM806U */
  1976. .driver_info = RSVD(4) },
  1977. { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x2060, 0xff), /* BroadMobi BM818 */
  1978. .driver_info = RSVD(4) },
  1979. { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x4000, 0xff) }, /* OLICARD300 - MT6225 */
  1980. { USB_DEVICE(INOVIA_VENDOR_ID, INOVIA_SEW858) },
  1981. { USB_DEVICE(VIATELECOM_VENDOR_ID, VIATELECOM_PRODUCT_CDS7) },
  1982. { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD200, 0xff, 0xff, 0xff) },
  1983. { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) },
  1984. { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) },
  1985. { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) }, /* HP lt2523 (Novatel E371) */
  1986. { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x10) }, /* HP lt4132 (Huawei ME906s-158) */
  1987. { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x12) },
  1988. { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x13) },
  1989. { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x14) },
  1990. { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x1b) },
  1991. { USB_DEVICE(0x0489, 0xe0b4), /* Foxconn T77W968 */
  1992. .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
  1993. { USB_DEVICE(0x0489, 0xe0b5), /* Foxconn T77W968 ESIM */
  1994. .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
  1995. { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */
  1996. .driver_info = RSVD(4) | RSVD(5) | RSVD(6) },
  1997. { USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */
  1998. .driver_info = RSVD(4) | RSVD(5) },
  1999. { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */
  2000. .driver_info = RSVD(6) },
  2001. { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */
  2002. { USB_DEVICE_INTERFACE_CLASS(0x2df3, 0x9d03, 0xff) }, /* LongSung M5710 */
  2003. { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */
  2004. { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */
  2005. { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */
  2006. { } /* Terminating entry */
  2007. };
  2008. MODULE_DEVICE_TABLE(usb, option_ids);
  2009. /* The card has three separate interfaces, which the serial driver
  2010. * recognizes separately, thus num_port=1.
  2011. */
  2012. static struct usb_serial_driver option_1port_device = {
  2013. .driver = {
  2014. .owner = THIS_MODULE,
  2015. .name = "option1",
  2016. },
  2017. .description = "GSM modem (1-port)",
  2018. .id_table = option_ids,
  2019. .num_ports = 1,
  2020. .probe = option_probe,
  2021. .open = usb_wwan_open,
  2022. .close = usb_wwan_close,
  2023. .dtr_rts = usb_wwan_dtr_rts,
  2024. .write = usb_wwan_write,
  2025. .write_room = usb_wwan_write_room,
  2026. .chars_in_buffer = usb_wwan_chars_in_buffer,
  2027. .tiocmget = usb_wwan_tiocmget,
  2028. .tiocmset = usb_wwan_tiocmset,
  2029. .ioctl = usb_wwan_ioctl,
  2030. .attach = option_attach,
  2031. .release = option_release,
  2032. .port_probe = usb_wwan_port_probe,
  2033. .port_remove = usb_wwan_port_remove,
  2034. .read_int_callback = option_instat_callback,
  2035. #ifdef CONFIG_PM
  2036. .suspend = usb_wwan_suspend,
  2037. .resume = usb_wwan_resume,
  2038. #if 1 //Added by Quectel
  2039. .reset_resume = usb_wwan_resume,
  2040. #endif
  2041. #endif
  2042. };
  2043. static struct usb_serial_driver * const serial_drivers[] = {
  2044. &option_1port_device, NULL
  2045. };
  2046. module_usb_serial_driver(serial_drivers, option_ids);
  2047. static bool iface_is_reserved(unsigned long device_flags, u8 ifnum)
  2048. {
  2049. if (ifnum > FLAG_IFNUM_MAX)
  2050. return false;
  2051. return device_flags & RSVD(ifnum);
  2052. }
  2053. static int option_probe(struct usb_serial *serial,
  2054. const struct usb_device_id *id)
  2055. {
  2056. struct usb_interface_descriptor *iface_desc =
  2057. &serial->interface->cur_altsetting->desc;
  2058. unsigned long device_flags = id->driver_info;
  2059. #if 1 //Added by Quectel
  2060. //Quectel UC20's interface 4 can be used as USB Network device
  2061. if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) && serial->dev->descriptor.idProduct == cpu_to_le16(0x9003)
  2062. && serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
  2063. return -ENODEV;
  2064. //Quectel EC20(MDM9215)'s interface 4 can be used as USB Network device
  2065. if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) && serial->dev->descriptor.idProduct == cpu_to_le16(0x9215)
  2066. && serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
  2067. return -ENODEV;
  2068. if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2C7C)) {
  2069. __u16 idProduct = le16_to_cpu(serial->dev->descriptor.idProduct);
  2070. //Quectel module's some interfaces can be used as USB Network device (ecm, rndis, mbim)
  2071. if (serial->interface->cur_altsetting->desc.bInterfaceClass != 0xFF)
  2072. return -ENODEV;
  2073. //Quectel EC25&EC20's interface 4 can be used as USB network device (qmi)
  2074. if ((idProduct != 0x6026 && idProduct != 0x6120) && serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
  2075. return -ENODEV;
  2076. }
  2077. #endif
  2078. /* Never bind to the CD-Rom emulation interface */
  2079. if (iface_desc->bInterfaceClass == USB_CLASS_MASS_STORAGE)
  2080. return -ENODEV;
  2081. /*
  2082. * Don't bind reserved interfaces (like network ones) which often have
  2083. * the same class/subclass/protocol as the serial interfaces. Look at
  2084. * the Windows driver .INF files for reserved interface numbers.
  2085. */
  2086. if (iface_is_reserved(device_flags, iface_desc->bInterfaceNumber))
  2087. return -ENODEV;
  2088. /*
  2089. * Allow matching on bNumEndpoints for devices whose interface numbers
  2090. * can change (e.g. Quectel EP06).
  2091. */
  2092. if (device_flags & NUMEP2 && iface_desc->bNumEndpoints != 2)
  2093. return -ENODEV;
  2094. /* Store the device flags so we can use them during attach. */
  2095. usb_set_serial_data(serial, (void *)device_flags);
  2096. return 0;
  2097. }
  2098. static bool iface_no_modem_control(unsigned long device_flags, u8 ifnum)
  2099. {
  2100. if (ifnum > FLAG_IFNUM_MAX)
  2101. return false;
  2102. return device_flags & NCTRL(ifnum);
  2103. }
  2104. static int option_attach(struct usb_serial *serial)
  2105. {
  2106. struct usb_interface_descriptor *iface_desc;
  2107. struct usb_wwan_intf_private *data;
  2108. unsigned long device_flags;
  2109. data = kzalloc(sizeof(struct usb_wwan_intf_private), GFP_KERNEL);
  2110. if (!data)
  2111. return -ENOMEM;
  2112. /* Retrieve device flags stored at probe. */
  2113. device_flags = (unsigned long)usb_get_serial_data(serial);
  2114. iface_desc = &serial->interface->cur_altsetting->desc;
  2115. if (!iface_no_modem_control(device_flags, iface_desc->bInterfaceNumber))
  2116. data->use_send_setup = 1;
  2117. if (device_flags & ZLP)
  2118. data->use_zlp = 1;
  2119. spin_lock_init(&data->susp_lock);
  2120. usb_set_serial_data(serial, data);
  2121. return 0;
  2122. }
  2123. static void option_release(struct usb_serial *serial)
  2124. {
  2125. struct usb_wwan_intf_private *intfdata = usb_get_serial_data(serial);
  2126. kfree(intfdata);
  2127. }
  2128. static void option_instat_callback(struct urb *urb)
  2129. {
  2130. int err;
  2131. int status = urb->status;
  2132. struct usb_serial_port *port = urb->context;
  2133. struct device *dev = &port->dev;
  2134. struct usb_wwan_port_private *portdata =
  2135. usb_get_serial_port_data(port);
  2136. dev_dbg(dev, "%s: urb %p port %p has data %p\n", __func__, urb, port, portdata);
  2137. if (status == 0) {
  2138. struct usb_ctrlrequest *req_pkt =
  2139. (struct usb_ctrlrequest *)urb->transfer_buffer;
  2140. if (!req_pkt) {
  2141. dev_dbg(dev, "%s: NULL req_pkt\n", __func__);
  2142. return;
  2143. }
  2144. if ((req_pkt->bRequestType == 0xA1) &&
  2145. (req_pkt->bRequest == 0x20)) {
  2146. int old_dcd_state;
  2147. unsigned char signals = *((unsigned char *)
  2148. urb->transfer_buffer +
  2149. sizeof(struct usb_ctrlrequest));
  2150. dev_dbg(dev, "%s: signal x%x\n", __func__, signals);
  2151. old_dcd_state = portdata->dcd_state;
  2152. portdata->cts_state = 1;
  2153. portdata->dcd_state = ((signals & 0x01) ? 1 : 0);
  2154. portdata->dsr_state = ((signals & 0x02) ? 1 : 0);
  2155. portdata->ri_state = ((signals & 0x08) ? 1 : 0);
  2156. if (old_dcd_state && !portdata->dcd_state)
  2157. tty_port_tty_hangup(&port->port, true);
  2158. } else {
  2159. dev_dbg(dev, "%s: type %x req %x\n", __func__,
  2160. req_pkt->bRequestType, req_pkt->bRequest);
  2161. }
  2162. } else if (status == -ENOENT || status == -ESHUTDOWN) {
  2163. dev_dbg(dev, "%s: urb stopped: %d\n", __func__, status);
  2164. } else
  2165. dev_dbg(dev, "%s: error %d\n", __func__, status);
  2166. /* Resubmit urb so we continue receiving IRQ data */
  2167. if (status != -ESHUTDOWN && status != -ENOENT) {
  2168. usb_mark_last_busy(port->serial->dev);
  2169. err = usb_submit_urb(urb, GFP_ATOMIC);
  2170. if (err)
  2171. dev_dbg(dev, "%s: resubmit intr urb failed. (%d)\n",
  2172. __func__, err);
  2173. }
  2174. }
  2175. MODULE_AUTHOR(DRIVER_AUTHOR);
  2176. MODULE_DESCRIPTION(DRIVER_DESC);
  2177. MODULE_LICENSE("GPL v2");
  1. \kernel\drivers\usb\serial\usb_wwan.c
  2. // SPDX-License-Identifier: GPL-2.0
  3. /*
  4. USB Driver layer for GSM modems
  5. Copyright (C) 2005 Matthias Urlichs <smurf@smurf.noris.de>
  6. Portions copied from the Keyspan driver by Hugh Blemings <hugh@blemings.org>
  7. History: see the git log.
  8. Work sponsored by: Sigos GmbH, Germany <info@sigos.de>
  9. This driver exists because the "normal" serial driver doesn't work too well
  10. with GSM modems. Issues:
  11. - data loss -- one single Receive URB is not nearly enough
  12. - controlling the baud rate doesn't make sense
  13. */
  14. #define DRIVER_AUTHOR "Matthias Urlichs <smurf@smurf.noris.de>"
  15. #define DRIVER_DESC "USB Driver for GSM modems"
  16. #include <linux/kernel.h>
  17. #include <linux/jiffies.h>
  18. #include <linux/errno.h>
  19. #include <linux/slab.h>
  20. #include <linux/tty.h>
  21. #include <linux/tty_flip.h>
  22. #include <linux/module.h>
  23. #include <linux/bitops.h>
  24. #include <linux/uaccess.h>
  25. #include <linux/usb.h>
  26. #include <linux/usb/serial.h>
  27. #include <linux/serial.h>
  28. #include "usb-wwan.h"
  29. /*
  30. * Generate DTR/RTS signals on the port using the SET_CONTROL_LINE_STATE request
  31. * in CDC ACM.
  32. */
  33. static int usb_wwan_send_setup(struct usb_serial_port *port)
  34. {
  35. struct usb_serial *serial = port->serial;
  36. struct usb_wwan_port_private *portdata;
  37. int val = 0;
  38. int ifnum;
  39. int res;
  40. portdata = usb_get_serial_port_data(port);
  41. if (portdata->dtr_state)
  42. val |= 0x01;
  43. if (portdata->rts_state)
  44. val |= 0x02;
  45. ifnum = serial->interface->cur_altsetting->desc.bInterfaceNumber;
  46. res = usb_autopm_get_interface(serial->interface);
  47. if (res)
  48. return res;
  49. res = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
  50. 0x22, 0x21, val, ifnum, NULL, 0,
  51. USB_CTRL_SET_TIMEOUT);
  52. usb_autopm_put_interface(port->serial->interface);
  53. return res;
  54. }
  55. void usb_wwan_dtr_rts(struct usb_serial_port *port, int on)
  56. {
  57. struct usb_wwan_port_private *portdata;
  58. struct usb_wwan_intf_private *intfdata;
  59. intfdata = usb_get_serial_data(port->serial);
  60. if (!intfdata->use_send_setup)
  61. return;
  62. portdata = usb_get_serial_port_data(port);
  63. /* FIXME: locking */
  64. portdata->rts_state = on;
  65. portdata->dtr_state = on;
  66. usb_wwan_send_setup(port);
  67. }
  68. EXPORT_SYMBOL(usb_wwan_dtr_rts);
  69. int usb_wwan_tiocmget(struct tty_struct *tty)
  70. {
  71. struct usb_serial_port *port = tty->driver_data;
  72. unsigned int value;
  73. struct usb_wwan_port_private *portdata;
  74. portdata = usb_get_serial_port_data(port);
  75. value = ((portdata->rts_state) ? TIOCM_RTS : 0) |
  76. ((portdata->dtr_state) ? TIOCM_DTR : 0) |
  77. ((portdata->cts_state) ? TIOCM_CTS : 0) |
  78. ((portdata->dsr_state) ? TIOCM_DSR : 0) |
  79. ((portdata->dcd_state) ? TIOCM_CAR : 0) |
  80. ((portdata->ri_state) ? TIOCM_RNG : 0);
  81. return value;
  82. }
  83. EXPORT_SYMBOL(usb_wwan_tiocmget);
  84. int usb_wwan_tiocmset(struct tty_struct *tty,
  85. unsigned int set, unsigned int clear)
  86. {
  87. struct usb_serial_port *port = tty->driver_data;
  88. struct usb_wwan_port_private *portdata;
  89. struct usb_wwan_intf_private *intfdata;
  90. portdata = usb_get_serial_port_data(port);
  91. intfdata = usb_get_serial_data(port->serial);
  92. if (!intfdata->use_send_setup)
  93. return -EINVAL;
  94. /* FIXME: what locks portdata fields ? */
  95. if (set & TIOCM_RTS)
  96. portdata->rts_state = 1;
  97. if (set & TIOCM_DTR)
  98. portdata->dtr_state = 1;
  99. if (clear & TIOCM_RTS)
  100. portdata->rts_state = 0;
  101. if (clear & TIOCM_DTR)
  102. portdata->dtr_state = 0;
  103. return usb_wwan_send_setup(port);
  104. }
  105. EXPORT_SYMBOL(usb_wwan_tiocmset);
  106. static int get_serial_info(struct usb_serial_port *port,
  107. struct serial_struct __user *retinfo)
  108. {
  109. struct serial_struct tmp;
  110. memset(&tmp, 0, sizeof(tmp));
  111. tmp.line = port->minor;
  112. tmp.port = port->port_number;
  113. tmp.baud_base = tty_get_baud_rate(port->port.tty);
  114. tmp.close_delay = port->port.close_delay / 10;
  115. tmp.closing_wait = port->port.closing_wait == ASYNC_CLOSING_WAIT_NONE ?
  116. ASYNC_CLOSING_WAIT_NONE :
  117. port->port.closing_wait / 10;
  118. if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
  119. return -EFAULT;
  120. return 0;
  121. }
  122. static int set_serial_info(struct usb_serial_port *port,
  123. struct serial_struct __user *newinfo)
  124. {
  125. struct serial_struct new_serial;
  126. unsigned int closing_wait, close_delay;
  127. int retval = 0;
  128. if (copy_from_user(&new_serial, newinfo, sizeof(new_serial)))
  129. return -EFAULT;
  130. close_delay = new_serial.close_delay * 10;
  131. closing_wait = new_serial.closing_wait == ASYNC_CLOSING_WAIT_NONE ?
  132. ASYNC_CLOSING_WAIT_NONE : new_serial.closing_wait * 10;
  133. mutex_lock(&port->port.mutex);
  134. if (!capable(CAP_SYS_ADMIN)) {
  135. if ((close_delay != port->port.close_delay) ||
  136. (closing_wait != port->port.closing_wait))
  137. retval = -EPERM;
  138. else
  139. retval = -EOPNOTSUPP;
  140. } else {
  141. port->port.close_delay = close_delay;
  142. port->port.closing_wait = closing_wait;
  143. }
  144. mutex_unlock(&port->port.mutex);
  145. return retval;
  146. }
  147. int usb_wwan_ioctl(struct tty_struct *tty,
  148. unsigned int cmd, unsigned long arg)
  149. {
  150. struct usb_serial_port *port = tty->driver_data;
  151. dev_dbg(&port->dev, "%s cmd 0x%04x\n", __func__, cmd);
  152. switch (cmd) {
  153. case TIOCGSERIAL:
  154. return get_serial_info(port,
  155. (struct serial_struct __user *) arg);
  156. case TIOCSSERIAL:
  157. return set_serial_info(port,
  158. (struct serial_struct __user *) arg);
  159. default:
  160. break;
  161. }
  162. dev_dbg(&port->dev, "%s arg not supported\n", __func__);
  163. return -ENOIOCTLCMD;
  164. }
  165. EXPORT_SYMBOL(usb_wwan_ioctl);
  166. int usb_wwan_write(struct tty_struct *tty, struct usb_serial_port *port,
  167. const unsigned char *buf, int count)
  168. {
  169. struct usb_wwan_port_private *portdata;
  170. struct usb_wwan_intf_private *intfdata;
  171. int i;
  172. int left, todo;
  173. struct urb *this_urb = NULL; /* spurious */
  174. int err;
  175. unsigned long flags;
  176. portdata = usb_get_serial_port_data(port);
  177. intfdata = usb_get_serial_data(port->serial);
  178. dev_dbg(&port->dev, "%s: write (%d chars)\n", __func__, count);
  179. i = 0;
  180. left = count;
  181. for (i = 0; left > 0 && i < N_OUT_URB; i++) {
  182. todo = left;
  183. if (todo > OUT_BUFLEN)
  184. todo = OUT_BUFLEN;
  185. this_urb = portdata->out_urbs[i];
  186. if (test_and_set_bit(i, &portdata->out_busy)) {
  187. if (time_before(jiffies,
  188. portdata->tx_start_time[i] + 10 * HZ))
  189. continue;
  190. usb_unlink_urb(this_urb);
  191. continue;
  192. }
  193. dev_dbg(&port->dev, "%s: endpoint %d buf %d\n", __func__,
  194. usb_pipeendpoint(this_urb->pipe), i);
  195. err = usb_autopm_get_interface_async(port->serial->interface);
  196. if (err < 0) {
  197. clear_bit(i, &portdata->out_busy);
  198. break;
  199. }
  200. /* send the data */
  201. memcpy(this_urb->transfer_buffer, buf, todo);
  202. this_urb->transfer_buffer_length = todo;
  203. spin_lock_irqsave(&intfdata->susp_lock, flags);
  204. if (intfdata->suspended) {
  205. usb_anchor_urb(this_urb, &portdata->delayed);
  206. spin_unlock_irqrestore(&intfdata->susp_lock, flags);
  207. } else {
  208. intfdata->in_flight++;
  209. spin_unlock_irqrestore(&intfdata->susp_lock, flags);
  210. err = usb_submit_urb(this_urb, GFP_ATOMIC);
  211. if (err) {
  212. dev_err(&port->dev,
  213. "%s: submit urb %d failed: %d\n",
  214. __func__, i, err);
  215. clear_bit(i, &portdata->out_busy);
  216. spin_lock_irqsave(&intfdata->susp_lock, flags);
  217. intfdata->in_flight--;
  218. spin_unlock_irqrestore(&intfdata->susp_lock,
  219. flags);
  220. usb_autopm_put_interface_async(port->serial->interface);
  221. break;
  222. }
  223. }
  224. portdata->tx_start_time[i] = jiffies;
  225. buf += todo;
  226. left -= todo;
  227. }
  228. count -= left;
  229. dev_dbg(&port->dev, "%s: wrote (did %d)\n", __func__, count);
  230. return count;
  231. }
  232. EXPORT_SYMBOL(usb_wwan_write);
  233. static void usb_wwan_indat_callback(struct urb *urb)
  234. {
  235. int err;
  236. int endpoint;
  237. struct usb_serial_port *port;
  238. struct device *dev;
  239. unsigned char *data = urb->transfer_buffer;
  240. int status = urb->status;
  241. endpoint = usb_pipeendpoint(urb->pipe);
  242. port = urb->context;
  243. dev = &port->dev;
  244. if (status) {
  245. dev_dbg(dev, "%s: nonzero status: %d on endpoint %02x.\n",
  246. __func__, status, endpoint);
  247. /* don't resubmit on fatal errors */
  248. if (status == -ESHUTDOWN || status == -ENOENT)
  249. return;
  250. } else {
  251. if (urb->actual_length) {
  252. tty_insert_flip_string(&port->port, data,
  253. urb->actual_length);
  254. tty_flip_buffer_push(&port->port);
  255. } else
  256. dev_dbg(dev, "%s: empty read urb received\n", __func__);
  257. }
  258. /* Resubmit urb so we continue receiving */
  259. err = usb_submit_urb(urb, GFP_ATOMIC);
  260. if (err) {
  261. if (err != -EPERM && err != -ENODEV) {
  262. dev_err(dev, "%s: resubmit read urb failed. (%d)\n",
  263. __func__, err);
  264. /* busy also in error unless we are killed */
  265. usb_mark_last_busy(port->serial->dev);
  266. }
  267. } else {
  268. usb_mark_last_busy(port->serial->dev);
  269. }
  270. }
  271. static void usb_wwan_outdat_callback(struct urb *urb)
  272. {
  273. struct usb_serial_port *port;
  274. struct usb_wwan_port_private *portdata;
  275. struct usb_wwan_intf_private *intfdata;
  276. unsigned long flags;
  277. int i;
  278. port = urb->context;
  279. intfdata = usb_get_serial_data(port->serial);
  280. usb_serial_port_softint(port);
  281. usb_autopm_put_interface_async(port->serial->interface);
  282. portdata = usb_get_serial_port_data(port);
  283. spin_lock_irqsave(&intfdata->susp_lock, flags);
  284. intfdata->in_flight--;
  285. spin_unlock_irqrestore(&intfdata->susp_lock, flags);
  286. for (i = 0; i < N_OUT_URB; ++i) {
  287. if (portdata->out_urbs[i] == urb) {
  288. smp_mb__before_atomic();
  289. clear_bit(i, &portdata->out_busy);
  290. break;
  291. }
  292. }
  293. }
  294. int usb_wwan_write_room(struct tty_struct *tty)
  295. {
  296. struct usb_serial_port *port = tty->driver_data;
  297. struct usb_wwan_port_private *portdata;
  298. int i;
  299. int data_len = 0;
  300. struct urb *this_urb;
  301. portdata = usb_get_serial_port_data(port);
  302. for (i = 0; i < N_OUT_URB; i++) {
  303. this_urb = portdata->out_urbs[i];
  304. if (this_urb && !test_bit(i, &portdata->out_busy))
  305. data_len += OUT_BUFLEN;
  306. }
  307. dev_dbg(&port->dev, "%s: %d\n", __func__, data_len);
  308. return data_len;
  309. }
  310. EXPORT_SYMBOL(usb_wwan_write_room);
  311. int usb_wwan_chars_in_buffer(struct tty_struct *tty)
  312. {
  313. struct usb_serial_port *port = tty->driver_data;
  314. struct usb_wwan_port_private *portdata;
  315. int i;
  316. int data_len = 0;
  317. struct urb *this_urb;
  318. portdata = usb_get_serial_port_data(port);
  319. for (i = 0; i < N_OUT_URB; i++) {
  320. this_urb = portdata->out_urbs[i];
  321. /* FIXME: This locking is insufficient as this_urb may
  322. go unused during the test */
  323. if (this_urb && test_bit(i, &portdata->out_busy))
  324. data_len += this_urb->transfer_buffer_length;
  325. }
  326. dev_dbg(&port->dev, "%s: %d\n", __func__, data_len);
  327. return data_len;
  328. }
  329. EXPORT_SYMBOL(usb_wwan_chars_in_buffer);
  330. int usb_wwan_open(struct tty_struct *tty, struct usb_serial_port *port)
  331. {
  332. struct usb_wwan_port_private *portdata;
  333. struct usb_wwan_intf_private *intfdata;
  334. struct usb_serial *serial = port->serial;
  335. int i, err;
  336. struct urb *urb;
  337. portdata = usb_get_serial_port_data(port);
  338. intfdata = usb_get_serial_data(serial);
  339. if (port->interrupt_in_urb) {
  340. err = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
  341. if (err) {
  342. dev_err(&port->dev, "%s: submit int urb failed: %d\n",
  343. __func__, err);
  344. }
  345. }
  346. /* Start reading from the IN endpoint */
  347. for (i = 0; i < N_IN_URB; i++) {
  348. urb = portdata->in_urbs[i];
  349. if (!urb)
  350. continue;
  351. err = usb_submit_urb(urb, GFP_KERNEL);
  352. if (err) {
  353. dev_err(&port->dev,
  354. "%s: submit read urb %d failed: %d\n",
  355. __func__, i, err);
  356. }
  357. }
  358. spin_lock_irq(&intfdata->susp_lock);
  359. if (++intfdata->open_ports == 1)
  360. serial->interface->needs_remote_wakeup = 1;
  361. spin_unlock_irq(&intfdata->susp_lock);
  362. /* this balances a get in the generic USB serial code */
  363. usb_autopm_put_interface(serial->interface);
  364. return 0;
  365. }
  366. EXPORT_SYMBOL(usb_wwan_open);
  367. static void unbusy_queued_urb(struct urb *urb,
  368. struct usb_wwan_port_private *portdata)
  369. {
  370. int i;
  371. for (i = 0; i < N_OUT_URB; i++) {
  372. if (urb == portdata->out_urbs[i]) {
  373. clear_bit(i, &portdata->out_busy);
  374. break;
  375. }
  376. }
  377. }
  378. void usb_wwan_close(struct usb_serial_port *port)
  379. {
  380. int i;
  381. struct usb_serial *serial = port->serial;
  382. struct usb_wwan_port_private *portdata;
  383. struct usb_wwan_intf_private *intfdata = usb_get_serial_data(serial);
  384. struct urb *urb;
  385. portdata = usb_get_serial_port_data(port);
  386. /*
  387. * Need to take susp_lock to make sure port is not already being
  388. * resumed, but no need to hold it due to initialized
  389. */
  390. spin_lock_irq(&intfdata->susp_lock);
  391. if (--intfdata->open_ports == 0)
  392. serial->interface->needs_remote_wakeup = 0;
  393. spin_unlock_irq(&intfdata->susp_lock);
  394. for (;;) {
  395. urb = usb_get_from_anchor(&portdata->delayed);
  396. if (!urb)
  397. break;
  398. unbusy_queued_urb(urb, portdata);
  399. usb_autopm_put_interface_async(serial->interface);
  400. }
  401. for (i = 0; i < N_IN_URB; i++)
  402. usb_kill_urb(portdata->in_urbs[i]);
  403. for (i = 0; i < N_OUT_URB; i++)
  404. usb_kill_urb(portdata->out_urbs[i]);
  405. usb_kill_urb(port->interrupt_in_urb);
  406. usb_autopm_get_interface_no_resume(serial->interface);
  407. }
  408. EXPORT_SYMBOL(usb_wwan_close);
  409. static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port,
  410. int endpoint,
  411. int dir, void *ctx, char *buf, int len,
  412. void (*callback) (struct urb *))
  413. {
  414. struct usb_serial *serial = port->serial;
  415. struct usb_wwan_intf_private *intfdata = usb_get_serial_data(serial);
  416. struct urb *urb;
  417. struct usb_device_descriptor *desc = &serial->dev->descriptor;
  418. urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */
  419. if (!urb)
  420. return NULL;
  421. usb_fill_bulk_urb(urb, serial->dev,
  422. usb_sndbulkpipe(serial->dev, endpoint) | dir,
  423. buf, len, callback, ctx);
  424. if (intfdata->use_zlp && dir == USB_DIR_OUT)
  425. urb->transfer_flags |= URB_ZERO_PACKET;
  426. if (dir == USB_DIR_OUT) {
  427. if ((desc->idVendor == cpu_to_le16(0x1286) &&
  428. desc->idProduct == cpu_to_le16(0x4e3c)))
  429. urb->transfer_flags |= URB_ZERO_PACKET;
  430. if (desc->idVendor == cpu_to_le16(0x2c7c))
  431. urb->transfer_flags |= URB_ZERO_PACKET;
  432. }
  433. return urb;
  434. }
  435. int usb_wwan_port_probe(struct usb_serial_port *port)
  436. {
  437. struct usb_wwan_port_private *portdata;
  438. struct urb *urb;
  439. u8 *buffer;
  440. int i;
  441. if (!port->bulk_in_size || !port->bulk_out_size)
  442. return -ENODEV;
  443. portdata = kzalloc(sizeof(*portdata), GFP_KERNEL);
  444. if (!portdata)
  445. return -ENOMEM;
  446. init_usb_anchor(&portdata->delayed);
  447. for (i = 0; i < N_IN_URB; i++) {
  448. buffer = (u8 *)__get_free_page(GFP_KERNEL);
  449. if (!buffer)
  450. goto bail_out_error;
  451. portdata->in_buffer[i] = buffer;
  452. urb = usb_wwan_setup_urb(port, port->bulk_in_endpointAddress,
  453. USB_DIR_IN, port,
  454. buffer, IN_BUFLEN,
  455. usb_wwan_indat_callback);
  456. portdata->in_urbs[i] = urb;
  457. }
  458. for (i = 0; i < N_OUT_URB; i++) {
  459. buffer = kmalloc(OUT_BUFLEN, GFP_KERNEL);
  460. if (!buffer)
  461. goto bail_out_error2;
  462. portdata->out_buffer[i] = buffer;
  463. urb = usb_wwan_setup_urb(port, port->bulk_out_endpointAddress,
  464. USB_DIR_OUT, port,
  465. buffer, OUT_BUFLEN,
  466. usb_wwan_outdat_callback);
  467. portdata->out_urbs[i] = urb;
  468. }
  469. usb_set_serial_port_data(port, portdata);
  470. return 0;
  471. bail_out_error2:
  472. for (i = 0; i < N_OUT_URB; i++) {
  473. usb_free_urb(portdata->out_urbs[i]);
  474. kfree(portdata->out_buffer[i]);
  475. }
  476. bail_out_error:
  477. for (i = 0; i < N_IN_URB; i++) {
  478. usb_free_urb(portdata->in_urbs[i]);
  479. free_page((unsigned long)portdata->in_buffer[i]);
  480. }
  481. kfree(portdata);
  482. return -ENOMEM;
  483. }
  484. EXPORT_SYMBOL_GPL(usb_wwan_port_probe);
  485. int usb_wwan_port_remove(struct usb_serial_port *port)
  486. {
  487. int i;
  488. struct usb_wwan_port_private *portdata;
  489. portdata = usb_get_serial_port_data(port);
  490. usb_set_serial_port_data(port, NULL);
  491. for (i = 0; i < N_IN_URB; i++) {
  492. usb_free_urb(portdata->in_urbs[i]);
  493. free_page((unsigned long)portdata->in_buffer[i]);
  494. }
  495. for (i = 0; i < N_OUT_URB; i++) {
  496. usb_free_urb(portdata->out_urbs[i]);
  497. kfree(portdata->out_buffer[i]);
  498. }
  499. kfree(portdata);
  500. return 0;
  501. }
  502. EXPORT_SYMBOL(usb_wwan_port_remove);
  503. #ifdef CONFIG_PM
  504. static void stop_urbs(struct usb_serial *serial)
  505. {
  506. int i, j;
  507. struct usb_serial_port *port;
  508. struct usb_wwan_port_private *portdata;
  509. for (i = 0; i < serial->num_ports; ++i) {
  510. port = serial->port[i];
  511. portdata = usb_get_serial_port_data(port);
  512. if (!portdata)
  513. continue;
  514. for (j = 0; j < N_IN_URB; j++)
  515. usb_kill_urb(portdata->in_urbs[j]);
  516. for (j = 0; j < N_OUT_URB; j++)
  517. usb_kill_urb(portdata->out_urbs[j]);
  518. usb_kill_urb(port->interrupt_in_urb);
  519. }
  520. }
  521. int usb_wwan_suspend(struct usb_serial *serial, pm_message_t message)
  522. {
  523. struct usb_wwan_intf_private *intfdata = usb_get_serial_data(serial);
  524. spin_lock_irq(&intfdata->susp_lock);
  525. if (PMSG_IS_AUTO(message)) {
  526. if (intfdata->in_flight) {
  527. spin_unlock_irq(&intfdata->susp_lock);
  528. return -EBUSY;
  529. }
  530. }
  531. intfdata->suspended = 1;
  532. spin_unlock_irq(&intfdata->susp_lock);
  533. stop_urbs(serial);
  534. return 0;
  535. }
  536. EXPORT_SYMBOL(usb_wwan_suspend);
  537. /* Caller must hold susp_lock. */
  538. static int usb_wwan_submit_delayed_urbs(struct usb_serial_port *port)
  539. {
  540. struct usb_serial *serial = port->serial;
  541. struct usb_wwan_intf_private *data = usb_get_serial_data(serial);
  542. struct usb_wwan_port_private *portdata;
  543. struct urb *urb;
  544. int err_count = 0;
  545. int err;
  546. portdata = usb_get_serial_port_data(port);
  547. for (;;) {
  548. urb = usb_get_from_anchor(&portdata->delayed);
  549. if (!urb)
  550. break;
  551. err = usb_submit_urb(urb, GFP_ATOMIC);
  552. if (err) {
  553. dev_err(&port->dev, "%s: submit urb failed: %d\n",
  554. __func__, err);
  555. err_count++;
  556. unbusy_queued_urb(urb, portdata);
  557. usb_autopm_put_interface_async(serial->interface);
  558. continue;
  559. }
  560. data->in_flight++;
  561. }
  562. if (err_count)
  563. return -EIO;
  564. return 0;
  565. }
  566. int usb_wwan_resume(struct usb_serial *serial)
  567. {
  568. int i, j;
  569. struct usb_serial_port *port;
  570. struct usb_wwan_intf_private *intfdata = usb_get_serial_data(serial);
  571. struct usb_wwan_port_private *portdata;
  572. struct urb *urb;
  573. int err;
  574. int err_count = 0;
  575. spin_lock_irq(&intfdata->susp_lock);
  576. for (i = 0; i < serial->num_ports; i++) {
  577. port = serial->port[i];
  578. if (!tty_port_initialized(&port->port))
  579. continue;
  580. portdata = usb_get_serial_port_data(port);
  581. if (port->interrupt_in_urb) {
  582. err = usb_submit_urb(port->interrupt_in_urb,
  583. GFP_ATOMIC);
  584. if (err) {
  585. dev_err(&port->dev,
  586. "%s: submit int urb failed: %d\n",
  587. __func__, err);
  588. err_count++;
  589. }
  590. }
  591. err = usb_wwan_submit_delayed_urbs(port);
  592. if (err)
  593. err_count++;
  594. for (j = 0; j < N_IN_URB; j++) {
  595. urb = portdata->in_urbs[j];
  596. err = usb_submit_urb(urb, GFP_ATOMIC);
  597. if (err < 0) {
  598. dev_err(&port->dev,
  599. "%s: submit read urb %d failed: %d\n",
  600. __func__, i, err);
  601. err_count++;
  602. }
  603. }
  604. }
  605. intfdata->suspended = 0;
  606. spin_unlock_irq(&intfdata->susp_lock);
  607. if (err_count)
  608. return -EIO;
  609. return 0;
  610. }
  611. EXPORT_SYMBOL(usb_wwan_resume);
  612. #endif
  613. MODULE_AUTHOR(DRIVER_AUTHOR);
  614. MODULE_DESCRIPTION(DRIVER_DESC);
  615. MODULE_LICENSE("GPL v2");
  1. \kernel\drivers\net\usb\qmi_wwan_q.c
  2. /*
  3. * Copyright (c) 2012 Bjørn Mork <bjorn@mork.no>
  4. *
  5. * The probing code is heavily inspired by cdc_ether, which is:
  6. * Copyright (C) 2003-2005 by David Brownell
  7. * Copyright (C) 2006 by Ole Andre Vadla Ravnas (ActiveSync)
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * version 2 as published by the Free Software Foundation.
  12. */
  13. #include <linux/module.h>
  14. #include <linux/netdevice.h>
  15. #include <linux/ethtool.h>
  16. #include <linux/etherdevice.h>
  17. #include <linux/mii.h>
  18. #include <linux/usb.h>
  19. #include <linux/usb/cdc.h>
  20. #include <linux/usb/usbnet.h>
  21. #include <linux/usb/cdc-wdm.h>
  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
  25. * management
  26. *
  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
  33. *
  34. * Alternatively, control and data functions can be combined in a
  35. * single USB interface.
  36. *
  37. * Handling a protocol like QMI is out of the scope for any driver.
  38. * It is exported as a character device using the cdc-wdm driver as
  39. * a subdriver, enabling userspace applications ("modem managers") to
  40. * handle it.
  41. *
  42. * These devices may alternatively/additionally be configured using AT
  43. * commands on a serial interface
  44. */
  45. /* driver specific data */
  46. struct qmi_wwan_state {
  47. struct usb_driver *subdriver;
  48. atomic_t pmcount;
  49. unsigned long unused;
  50. struct usb_interface *control;
  51. struct usb_interface *data;
  52. };
  53. /* default ethernet address used by the modem */
  54. static const u8 default_modem_addr[ETH_ALEN] = {0x02, 0x50, 0xf3};
  55. #if 1 //Added by Quectel
  56. #include <linux/etherdevice.h>
  57. #include <net/arp.h>
  58. #include <net/ip.h>
  59. #include <net/ipv6.h>
  60. /*
  61. Quectel_WCDMA&LTE_Linux_USB_Driver_User_Guide_V1.9.pdf
  62. 5.6. Test QMAP on GobiNet or QMI WWAN
  63. 0 - no QMAP
  64. 1 - QMAP (Aggregation protocol)
  65. X - QMAP (Multiplexing and Aggregation protocol)
  66. */
  67. #define QUECTEL_WWAN_QMAP 4
  68. #if defined(QUECTEL_WWAN_QMAP)
  69. #define QUECTEL_QMAP_MUX_ID 0x81
  70. static uint __read_mostly qmap_mode = 0;
  71. module_param( qmap_mode, uint, S_IRUGO);
  72. module_param_named( rx_qmap, qmap_mode, uint, S_IRUGO );
  73. #endif
  74. #ifdef CONFIG_BRIDGE
  75. //#define QUECTEL_BRIDGE_MODE
  76. #endif
  77. #ifdef QUECTEL_BRIDGE_MODE
  78. static uint __read_mostly bridge_mode = BIT(0)/*|BIT(1)*/;
  79. module_param( bridge_mode, uint, S_IRUGO );
  80. #endif
  81. #if defined(QUECTEL_WWAN_QMAP)
  82. typedef struct sQmiWwanQmap
  83. {
  84. struct usbnet *mpNetDev;
  85. atomic_t refcount;
  86. struct net_device *mpQmapNetDev[QUECTEL_WWAN_QMAP];
  87. uint link_state;
  88. uint qmap_mode;
  89. #ifdef QUECTEL_BRIDGE_MODE
  90. uint bridge_mode;
  91. uint bridge_ipv4;
  92. unsigned char bridge_mac[ETH_ALEN];
  93. #endif
  94. } sQmiWwanQmap;
  95. struct qmap_priv {
  96. struct net_device *real_dev;
  97. u8 offset_id;
  98. #ifdef QUECTEL_BRIDGE_MODE
  99. uint bridge_mode;
  100. uint bridge_ipv4;
  101. unsigned char bridge_mac[ETH_ALEN];
  102. #endif
  103. };
  104. struct qmap_hdr {
  105. u8 cd_rsvd_pad;
  106. u8 mux_id;
  107. u16 pkt_len;
  108. } __packed;
  109. #ifdef QUECTEL_BRIDGE_MODE
  110. static int is_qmap_netdev(const struct net_device *netdev);
  111. #endif
  112. #endif
  113. #ifdef QUECTEL_BRIDGE_MODE
  114. static int bridge_arp_reply(struct net_device *net, struct sk_buff *skb, uint bridge_ipv4) {
  115. struct arphdr *parp;
  116. u8 *arpptr, *sha;
  117. u8 sip[4], tip[4], ipv4[4];
  118. struct sk_buff *reply = NULL;
  119. ipv4[0] = (bridge_ipv4 >> 24) & 0xFF;
  120. ipv4[1] = (bridge_ipv4 >> 16) & 0xFF;
  121. ipv4[2] = (bridge_ipv4 >> 8) & 0xFF;
  122. ipv4[3] = (bridge_ipv4 >> 0) & 0xFF;
  123. parp = arp_hdr(skb);
  124. if (parp->ar_hrd == htons(ARPHRD_ETHER) && parp->ar_pro == htons(ETH_P_IP)
  125. && parp->ar_op == htons(ARPOP_REQUEST) && parp->ar_hln == 6 && parp->ar_pln == 4) {
  126. arpptr = (u8 *)parp + sizeof(struct arphdr);
  127. sha = arpptr;
  128. arpptr += net->addr_len; /* sha */
  129. memcpy(sip, arpptr, sizeof(sip));
  130. arpptr += sizeof(sip);
  131. arpptr += net->addr_len; /* tha */
  132. memcpy(tip, arpptr, sizeof(tip));
  133. pr_info("%s sip = %d.%d.%d.%d, tip=%d.%d.%d.%d, ipv4=%d.%d.%d.%d\n", netdev_name(net),
  134. sip[0], sip[1], sip[2], sip[3], tip[0], tip[1], tip[2], tip[3], ipv4[0], ipv4[1], ipv4[2], ipv4[3]);
  135. //wwan0 sip = 10.151.137.255, tip=10.151.138.0, ipv4=10.151.137.255
  136. if (tip[0] == ipv4[0] && tip[1] == ipv4[1] && (tip[2]&0xFC) == (ipv4[2]&0xFC) && tip[3] != ipv4[3])
  137. reply = arp_create(ARPOP_REPLY, ETH_P_ARP, *((__be32 *)sip), net, *((__be32 *)tip), sha, default_modem_addr, sha);
  138. if (reply) {
  139. skb_reset_mac_header(reply);
  140. __skb_pull(reply, skb_network_offset(reply));
  141. reply->ip_summed = CHECKSUM_UNNECESSARY;
  142. reply->pkt_type = PACKET_HOST;
  143. netif_rx_ni(reply);
  144. }
  145. return 1;
  146. }
  147. return 0;
  148. }
  149. static struct sk_buff *bridge_mode_tx_fixup(struct net_device *net, struct sk_buff *skb, uint bridge_ipv4, unsigned char *bridge_mac) {
  150. struct ethhdr *ehdr;
  151. const struct iphdr *iph;
  152. skb_reset_mac_header(skb);
  153. ehdr = eth_hdr(skb);
  154. if (ehdr->h_proto == htons(ETH_P_ARP)) {
  155. if (bridge_ipv4)
  156. bridge_arp_reply(net, skb, bridge_ipv4);
  157. return NULL;
  158. }
  159. iph = ip_hdr(skb);
  160. //DBG("iphdr: ");
  161. //PrintHex((void *)iph, sizeof(struct iphdr));
  162. // 1 0.000000000 0.0.0.0 255.255.255.255 DHCP 362 DHCP Request - Transaction ID 0xe7643ad7
  163. if (ehdr->h_proto == htons(ETH_P_IP) && iph->protocol == IPPROTO_UDP && iph->saddr == 0x00000000 && iph->daddr == 0xFFFFFFFF) {
  164. //if (udp_hdr(skb)->dest == htons(67)) //DHCP Request
  165. {
  166. memcpy(bridge_mac, ehdr->h_source, ETH_ALEN);
  167. pr_info("%s PC Mac Address: %02x:%02x:%02x:%02x:%02x:%02x\n", netdev_name(net),
  168. bridge_mac[0], bridge_mac[1], bridge_mac[2], bridge_mac[3], bridge_mac[4], bridge_mac[5]);
  169. }
  170. }
  171. if (memcmp(ehdr->h_source, bridge_mac, ETH_ALEN)) {
  172. return NULL;
  173. }
  174. return skb;
  175. }
  176. #endif
  177. #if defined(QUECTEL_WWAN_QMAP)
  178. static ssize_t qmap_mode_show(struct device *dev, struct device_attribute *attr, char *buf) {
  179. struct net_device *netdev = to_net_dev(dev);
  180. struct usbnet * usbnetdev = netdev_priv( netdev );
  181. struct qmi_wwan_state *info = (void *)&usbnetdev->data;
  182. sQmiWwanQmap *pQmapDev = (sQmiWwanQmap *)info->unused;
  183. return snprintf(buf, PAGE_SIZE, "%d\n", pQmapDev->qmap_mode);
  184. }
  185. static DEVICE_ATTR(qmap_mode, S_IRUGO, qmap_mode_show, NULL);
  186. static ssize_t link_state_show(struct device *dev, struct device_attribute *attr, char *buf) {
  187. struct net_device *netdev = to_net_dev(dev);
  188. struct usbnet * usbnetdev = netdev_priv( netdev );
  189. struct qmi_wwan_state *info = (void *)&usbnetdev->data;
  190. sQmiWwanQmap *pQmapDev = (sQmiWwanQmap *)info->unused;
  191. return snprintf(buf, PAGE_SIZE, "0x%x\n", pQmapDev->link_state);
  192. }
  193. static ssize_t link_state_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) {
  194. struct net_device *netdev = to_net_dev(dev);
  195. struct usbnet * usbnetdev = netdev_priv( netdev );
  196. struct qmi_wwan_state *info = (void *)&usbnetdev->data;
  197. sQmiWwanQmap *pQmapDev = (sQmiWwanQmap *)info->unused;
  198. unsigned link_state = 0;
  199. unsigned old_link = pQmapDev->link_state;
  200. link_state = simple_strtoul(buf, NULL, 0);
  201. if (pQmapDev->qmap_mode == 1)
  202. pQmapDev->link_state = !!link_state;
  203. else if (pQmapDev->qmap_mode > 1) {
  204. if (0 < link_state && link_state <= pQmapDev->qmap_mode)
  205. pQmapDev->link_state |= (1 << (link_state - 1));
  206. else if (0x80 < link_state && link_state <= (0x80 + pQmapDev->qmap_mode))
  207. pQmapDev->link_state &= ~(1 << ((link_state&0xF) - 1));
  208. }
  209. if (old_link != pQmapDev->link_state)
  210. dev_info(dev, "link_state 0x%x -> 0x%x\n", old_link, pQmapDev->link_state);
  211. return count;
  212. }
  213. #ifdef QUECTEL_BRIDGE_MODE
  214. static ssize_t bridge_mode_show(struct device *dev, struct device_attribute *attr, char *buf) {
  215. struct net_device *netdev = to_net_dev(dev);
  216. uint bridge_mode = 0;
  217. if (is_qmap_netdev(netdev)) {
  218. struct qmap_priv *priv = netdev_priv(netdev);
  219. bridge_mode = priv->bridge_mode;
  220. }
  221. else {
  222. struct usbnet * usbnetdev = netdev_priv( netdev );
  223. struct qmi_wwan_state *info = (void *)&usbnetdev->data;
  224. sQmiWwanQmap *pQmapDev = (sQmiWwanQmap *)info->unused;
  225. bridge_mode = pQmapDev->bridge_mode;
  226. }
  227. return snprintf(buf, PAGE_SIZE, "%u\n", bridge_mode);
  228. }
  229. static ssize_t bridge_ipv4_show(struct device *dev, struct device_attribute *attr, char *buf) {
  230. struct net_device *netdev = to_net_dev(dev);
  231. unsigned int bridge_ipv4 = 0;
  232. unsigned char ipv4[4];
  233. if (is_qmap_netdev(netdev)) {
  234. struct qmap_priv *priv = netdev_priv(netdev);
  235. bridge_ipv4 = priv->bridge_ipv4;
  236. }
  237. else {
  238. struct usbnet * usbnetdev = netdev_priv( netdev );
  239. struct qmi_wwan_state *info = (void *)&usbnetdev->data;
  240. sQmiWwanQmap *pQmapDev = (sQmiWwanQmap *)info->unused;
  241. bridge_ipv4 = pQmapDev->bridge_ipv4;
  242. }
  243. ipv4[0] = (bridge_ipv4 >> 24) & 0xFF;
  244. ipv4[1] = (bridge_ipv4 >> 16) & 0xFF;
  245. ipv4[2] = (bridge_ipv4 >> 8) & 0xFF;
  246. ipv4[3] = (bridge_ipv4 >> 0) & 0xFF;
  247. return snprintf(buf, PAGE_SIZE, "%d.%d.%d.%d\n", ipv4[0], ipv4[1], ipv4[2], ipv4[3]);
  248. }
  249. static ssize_t bridge_ipv4_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) {
  250. struct net_device *netdev = to_net_dev(dev);
  251. if (is_qmap_netdev(netdev)) {
  252. struct qmap_priv *priv = netdev_priv(netdev);
  253. priv->bridge_ipv4 = simple_strtoul(buf, NULL, 16);
  254. }
  255. else {
  256. struct usbnet * usbnetdev = netdev_priv( netdev );
  257. struct qmi_wwan_state *info = (void *)&usbnetdev->data;
  258. sQmiWwanQmap *pQmapDev = (sQmiWwanQmap *)info->unused;
  259. pQmapDev->bridge_ipv4 = simple_strtoul(buf, NULL, 16);
  260. }
  261. return count;
  262. }
  263. #endif
  264. static DEVICE_ATTR(link_state, S_IWUSR | S_IRUGO, link_state_show, link_state_store);
  265. #ifdef QUECTEL_BRIDGE_MODE
  266. static DEVICE_ATTR(bridge_mode, S_IRUGO, bridge_mode_show, NULL);
  267. static DEVICE_ATTR(bridge_ipv4, S_IWUSR | S_IRUGO, bridge_ipv4_show, bridge_ipv4_store);
  268. #endif
  269. static struct attribute *qmi_wwan_sysfs_attrs[] = {
  270. &dev_attr_link_state.attr,
  271. &dev_attr_qmap_mode.attr,
  272. #ifdef QUECTEL_BRIDGE_MODE
  273. &dev_attr_bridge_mode.attr,
  274. &dev_attr_bridge_ipv4.attr,
  275. #endif
  276. NULL,
  277. };
  278. static struct attribute_group qmi_wwan_sysfs_attr_group = {
  279. .attrs = qmi_wwan_sysfs_attrs,
  280. };
  281. #ifdef QUECTEL_BRIDGE_MODE
  282. static struct attribute *qmi_qmap_sysfs_attrs[] = {
  283. &dev_attr_bridge_mode.attr,
  284. &dev_attr_bridge_ipv4.attr,
  285. NULL,
  286. };
  287. static struct attribute_group qmi_qmap_sysfs_attr_group = {
  288. .attrs = qmi_qmap_sysfs_attrs,
  289. };
  290. #endif
  291. static int qmap_open(struct net_device *dev)
  292. {
  293. struct qmap_priv *priv = netdev_priv(dev);
  294. struct net_device *real_dev = priv->real_dev;
  295. if (!(priv->real_dev->flags & IFF_UP))
  296. return -ENETDOWN;
  297. if (netif_carrier_ok(real_dev))
  298. netif_carrier_on(dev);
  299. return 0;
  300. }
  301. static int qmap_stop(struct net_device *pNet)
  302. {
  303. netif_carrier_off(pNet);
  304. return 0;
  305. }
  306. static int qmap_start_xmit(struct sk_buff *skb, struct net_device *pNet)
  307. {
  308. int err;
  309. struct qmap_priv *priv = netdev_priv(pNet);
  310. unsigned int len;
  311. struct qmap_hdr *hdr;
  312. skb_reset_mac_header(skb);
  313. #ifdef QUECTEL_BRIDGE_MODE
  314. if (priv->bridge_mode && bridge_mode_tx_fixup(pNet, skb, priv->bridge_ipv4, priv->bridge_mac) == NULL) {
  315. dev_kfree_skb_any (skb);
  316. return NETDEV_TX_OK;
  317. }
  318. #endif
  319. if (skb_pull(skb, ETH_HLEN) == NULL) {
  320. dev_kfree_skb_any (skb);
  321. return NETDEV_TX_OK;
  322. }
  323. len = skb->len;
  324. hdr = (struct qmap_hdr *)skb_push(skb, sizeof(struct qmap_hdr));
  325. hdr->cd_rsvd_pad = 0;
  326. hdr->mux_id = QUECTEL_QMAP_MUX_ID + priv->offset_id;
  327. hdr->pkt_len = cpu_to_be16(len);
  328. skb->dev = priv->real_dev;
  329. err = dev_queue_xmit(skb);
  330. if (err == NET_XMIT_SUCCESS) {
  331. pNet->stats.tx_packets++;
  332. pNet->stats.tx_bytes += skb->len;
  333. } else {
  334. pNet->stats.tx_errors++;
  335. }
  336. return err;
  337. }
  338. static const struct net_device_ops qmap_netdev_ops = {
  339. .ndo_open = qmap_open,
  340. .ndo_stop = qmap_stop,
  341. .ndo_start_xmit = qmap_start_xmit,
  342. };
  343. static int qmap_register_device(sQmiWwanQmap * pDev, u8 offset_id)
  344. {
  345. struct net_device *real_dev = pDev->mpNetDev->net;
  346. struct net_device *qmap_net;
  347. struct qmap_priv *priv;
  348. int err;
  349. qmap_net = alloc_etherdev(sizeof(*priv));
  350. if (!qmap_net)
  351. return -ENOBUFS;
  352. SET_NETDEV_DEV(qmap_net, &real_dev->dev);
  353. priv = netdev_priv(qmap_net);
  354. priv->offset_id = offset_id;
  355. priv->real_dev = real_dev;
  356. sprintf(qmap_net->name, "%s.%d", real_dev->name, offset_id + 1);
  357. qmap_net->netdev_ops = &qmap_netdev_ops;
  358. memcpy (qmap_net->dev_addr, real_dev->dev_addr, ETH_ALEN);
  359. #ifdef QUECTEL_BRIDGE_MODE
  360. priv->bridge_mode = !!(pDev->bridge_mode & BIT(offset_id));
  361. qmap_net->sysfs_groups[0] = &qmi_qmap_sysfs_attr_group;
  362. #endif
  363. err = register_netdev(qmap_net);
  364. if (err < 0)
  365. goto out_free_newdev;
  366. netif_device_attach (qmap_net);
  367. pDev->mpQmapNetDev[offset_id] = qmap_net;
  368. qmap_net->flags |= IFF_NOARP;
  369. dev_info(&real_dev->dev, "%s %s\n", __func__, qmap_net->name);
  370. return 0;
  371. out_free_newdev:
  372. free_netdev(qmap_net);
  373. return err;
  374. }
  375. static void qmap_unregister_device(sQmiWwanQmap * pDev, u8 offset_id) {
  376. struct net_device *net = pDev->mpQmapNetDev[offset_id];
  377. if (net != NULL) {
  378. netif_carrier_off( net );
  379. unregister_netdev (net);
  380. free_netdev(net);
  381. }
  382. }
  383. #ifdef CONFIG_ANDROID
  384. static int qmap_ndo_do_ioctl(struct net_device *dev,struct ifreq *ifr, int cmd) {
  385. int rc = -EOPNOTSUPP;
  386. uint link_state = 0;
  387. switch (cmd) {
  388. case 0x89F1: //SIOCDEVPRIVATE
  389. rc = copy_from_user(&link_state, ifr->ifr_ifru.ifru_data, sizeof(link_state));
  390. if (!rc) {
  391. char buf[32];
  392. snprintf(buf, sizeof(buf), "%u", link_state);
  393. link_state_store(&dev->dev, NULL, buf, strlen(buf));
  394. }
  395. break;
  396. default:
  397. break;
  398. }
  399. return rc;
  400. }
  401. #endif
  402. #ifdef QUECTEL_BRIDGE_MODE
  403. static int is_qmap_netdev(const struct net_device *netdev) {
  404. return netdev->netdev_ops == &qmap_netdev_ops;
  405. }
  406. #endif
  407. #endif
  408. static struct sk_buff *qmi_wwan_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags) {
  409. //MDM9x07,MDM9628,MDM9x40,SDX20,SDX24 only work on RAW IP mode
  410. if ((dev->driver_info->flags & FLAG_NOARP) == 0)
  411. return skb;
  412. // Skip Ethernet header from message
  413. if (dev->net->hard_header_len == 0)
  414. return skb;
  415. else
  416. skb_reset_mac_header(skb);
  417. #ifdef QUECTEL_BRIDGE_MODE
  418. {
  419. struct qmi_wwan_state *info = (void *)&dev->data;
  420. sQmiWwanQmap *pQmapDev = (sQmiWwanQmap *)info->unused;
  421. if (pQmapDev->bridge_mode && bridge_mode_tx_fixup(dev->net, skb, pQmapDev->bridge_ipv4, pQmapDev->bridge_mac) == NULL) {
  422. dev_kfree_skb_any (skb);
  423. return NULL;
  424. }
  425. }
  426. #endif
  427. if (skb_pull(skb, ETH_HLEN)) {
  428. return skb;
  429. } else {
  430. dev_err(&dev->intf->dev, "Packet Dropped ");
  431. }
  432. // Filter the packet out, release it
  433. dev_kfree_skb_any(skb);
  434. return NULL;
  435. }
  436. #endif
  437. /* Make up an ethernet header if the packet doesn't have one.
  438. *
  439. * A firmware bug common among several devices cause them to send raw
  440. * IP packets under some circumstances. There is no way for the
  441. * driver/host to know when this will happen. And even when the bug
  442. * hits, some packets will still arrive with an intact header.
  443. *
  444. * The supported devices are only capably of sending IPv4, IPv6 and
  445. * ARP packets on a point-to-point link. Any packet with an ethernet
  446. * header will have either our address or a broadcast/multicast
  447. * address as destination. ARP packets will always have a header.
  448. *
  449. * This means that this function will reliably add the appropriate
  450. * header iff necessary, provided our hardware address does not start
  451. * with 4 or 6.
  452. *
  453. * Another common firmware bug results in all packets being addressed
  454. * to 00:a0:c6:00:00:00 despite the host address being different.
  455. * This function will also fixup such packets.
  456. */
  457. static int qmi_wwan_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
  458. {
  459. __be16 proto;
  460. #ifdef QUECTEL_BRIDGE_MODE
  461. struct qmi_wwan_state *info = (void *)&dev->data;
  462. sQmiWwanQmap *pQmapDev = (sQmiWwanQmap *)info->unused;
  463. #endif
  464. /* This check is no longer done by usbnet */
  465. if (skb->len < dev->net->hard_header_len)
  466. return 0;
  467. switch (skb->data[0] & 0xf0) {
  468. case 0x40:
  469. proto = htons(ETH_P_IP);
  470. break;
  471. case 0x60:
  472. proto = htons(ETH_P_IPV6);
  473. break;
  474. case 0x00:
  475. if (is_multicast_ether_addr(skb->data))
  476. return 1;
  477. /* possibly bogus destination - rewrite just in case */
  478. skb_reset_mac_header(skb);
  479. goto fix_dest;
  480. default:
  481. /* pass along other packets without modifications */
  482. return 1;
  483. }
  484. if (skb_headroom(skb) < ETH_HLEN)
  485. return 0;
  486. skb_push(skb, ETH_HLEN);
  487. skb_reset_mac_header(skb);
  488. eth_hdr(skb)->h_proto = proto;
  489. memset(eth_hdr(skb)->h_source, 0, ETH_ALEN);
  490. #if 1 //Added by Quectel
  491. //some kernel will drop ethernet packet which's souce mac is all zero
  492. memcpy(eth_hdr(skb)->h_source, default_modem_addr, ETH_ALEN);
  493. #endif
  494. #ifdef QUECTEL_BRIDGE_MODE
  495. if (pQmapDev->bridge_mode) {
  496. memcpy(eth_hdr(skb)->h_dest, pQmapDev->bridge_mac, ETH_ALEN);
  497. }
  498. #endif
  499. fix_dest:
  500. memcpy(eth_hdr(skb)->h_dest, dev->net->dev_addr, ETH_ALEN);
  501. return 1;
  502. }
  503. #if defined(QUECTEL_WWAN_QMAP)
  504. static struct sk_buff *qmap_qmi_wwan_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags) {
  505. struct qmi_wwan_state *info = (void *)&dev->data;
  506. sQmiWwanQmap *pQmapDev = (sQmiWwanQmap *)info->unused;
  507. struct qmap_hdr *qhdr;
  508. if (unlikely(pQmapDev == NULL)) {
  509. goto drop_skb;
  510. } else if (unlikely(pQmapDev->qmap_mode && !pQmapDev->link_state)) {
  511. dev_dbg(&dev->net->dev, "link_state 0x%x, drop skb, len = %u\n", pQmapDev->link_state, skb->len);
  512. goto drop_skb;
  513. } else if (pQmapDev->qmap_mode == 0) {
  514. return qmi_wwan_tx_fixup(dev, skb, flags);
  515. }
  516. else if (pQmapDev->qmap_mode > 1) {
  517. qhdr = (struct qmap_hdr *)skb->data;
  518. if (qhdr->cd_rsvd_pad != 0) {
  519. goto drop_skb;
  520. }
  521. if ((qhdr->mux_id&0xF0) != 0x80) {
  522. goto drop_skb;
  523. }
  524. return skb;
  525. }
  526. else {
  527. if (qmi_wwan_tx_fixup(dev, skb, flags)) {
  528. qhdr = (struct qmap_hdr *)skb_push(skb, sizeof(struct qmap_hdr));
  529. qhdr->cd_rsvd_pad = 0;
  530. qhdr->mux_id = QUECTEL_QMAP_MUX_ID;
  531. qhdr->pkt_len = cpu_to_be16(skb->len - sizeof(struct qmap_hdr));
  532. return skb;
  533. }
  534. else {
  535. return NULL;
  536. }
  537. }
  538. drop_skb:
  539. dev_kfree_skb_any (skb);
  540. return NULL;
  541. }
  542. static int qmap_qmi_wwan_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
  543. {
  544. struct qmi_wwan_state *info = (void *)&dev->data;
  545. sQmiWwanQmap *pQmapDev = (sQmiWwanQmap *)info->unused;
  546. static int debug_len = 0;
  547. int debug_pkts = 0;
  548. int update_len = skb->len;
  549. if (pQmapDev->qmap_mode == 0)
  550. return qmi_wwan_rx_fixup(dev, skb);
  551. while (skb->len > sizeof(struct qmap_hdr)) {
  552. struct qmap_hdr *qhdr = (struct qmap_hdr *)skb->data;
  553. struct net_device *qmap_net;
  554. struct sk_buff *qmap_skb;
  555. #ifdef QUECTEL_BRIDGE_MODE
  556. uint bridge_mode = 0;
  557. unsigned char *bridge_mac;
  558. #endif
  559. __be16 proto;
  560. int pkt_len;
  561. u8 offset_id = 0;
  562. int err;
  563. unsigned len = (be16_to_cpu(qhdr->pkt_len) + sizeof(struct qmap_hdr));
  564. if (skb->len < (be16_to_cpu(qhdr->pkt_len) + sizeof(struct qmap_hdr))) {
  565. dev_info(&dev->net->dev, "drop qmap unknow pkt, len=%d, pkt_len=%d\n", skb->len, be16_to_cpu(qhdr->pkt_len));
  566. goto out;
  567. }
  568. debug_pkts++;
  569. if (qhdr->cd_rsvd_pad & 0x80) {
  570. dev_info(&dev->net->dev, "drop qmap command packet %x\n", qhdr->cd_rsvd_pad);
  571. goto skip_pkt;;
  572. }
  573. offset_id = qhdr->mux_id - QUECTEL_QMAP_MUX_ID;
  574. if (offset_id >= pQmapDev->qmap_mode) {
  575. dev_info(&dev->net->dev, "drop qmap unknow mux_id %x\n", qhdr->mux_id);
  576. goto skip_pkt;
  577. }
  578. qmap_net = pQmapDev->mpQmapNetDev[offset_id];
  579. if (qmap_net == NULL) {
  580. dev_info(&dev->net->dev, "drop qmap unknow mux_id %x\n", qhdr->mux_id);
  581. goto skip_pkt;
  582. }
  583. switch (skb->data[sizeof(struct qmap_hdr)] & 0xf0) {
  584. case 0x40:
  585. proto = htons(ETH_P_IP);
  586. break;
  587. case 0x60:
  588. proto = htons(ETH_P_IPV6);
  589. break;
  590. default:
  591. goto skip_pkt;
  592. }
  593. pkt_len = be16_to_cpu(qhdr->pkt_len) - (qhdr->cd_rsvd_pad&0x3F);
  594. qmap_skb = netdev_alloc_skb(qmap_net, ETH_HLEN + pkt_len);
  595. if (qmap_skb == NULL) {
  596. dev_info(&dev->net->dev, "fail to alloc skb, pkt_len = %d\n", pkt_len);
  597. return 0;
  598. }
  599. skb_reset_mac_header(qmap_skb);
  600. memcpy(eth_hdr(qmap_skb)->h_source, default_modem_addr, ETH_ALEN);
  601. memcpy(eth_hdr(qmap_skb)->h_dest, qmap_net->dev_addr, ETH_ALEN);
  602. eth_hdr(qmap_skb)->h_proto = proto;
  603. memcpy(skb_put(qmap_skb, ETH_HLEN + pkt_len) + ETH_HLEN, skb->data + sizeof(struct qmap_hdr), pkt_len);
  604. #ifdef QUECTEL_BRIDGE_MODE
  605. if (pQmapDev->qmap_mode > 1) {
  606. struct qmap_priv *priv = netdev_priv(qmap_net);
  607. bridge_mode = priv->bridge_mode;
  608. bridge_mac = priv->bridge_mac;
  609. }
  610. else {
  611. bridge_mode = pQmapDev->bridge_mode;
  612. bridge_mac = pQmapDev->bridge_mac;
  613. }
  614. if (bridge_mode) {
  615. memcpy(eth_hdr(qmap_skb)->h_dest, bridge_mac, ETH_ALEN);
  616. }
  617. #endif
  618. if (pQmapDev->qmap_mode > 1) {
  619. qmap_skb->protocol = eth_type_trans (qmap_skb, qmap_net);
  620. memset(qmap_skb->cb, 0, sizeof(struct skb_data));
  621. err = netif_rx(qmap_skb);
  622. if (err == NET_RX_SUCCESS) {
  623. qmap_net->stats.rx_packets++;
  624. qmap_net->stats.rx_bytes += qmap_skb->len;
  625. } else {
  626. qmap_net->stats.rx_errors++;
  627. }
  628. }
  629. else {
  630. usbnet_skb_return(dev, qmap_skb);
  631. }
  632. skip_pkt:
  633. skb_pull(skb, len);
  634. }
  635. out:
  636. if (update_len > debug_len) {
  637. debug_len = update_len;
  638. dev_info(&dev->net->dev, "rx_pkts=%d, rx_len=%d\n", debug_pkts, debug_len);
  639. }
  640. return 0;
  641. }
  642. #endif
  643. /* very simplistic detection of IPv4 or IPv6 headers */
  644. static bool possibly_iphdr(const char *data)
  645. {
  646. return (data[0] & 0xd0) == 0x40;
  647. }
  648. /* disallow addresses which may be confused with IP headers */
  649. static int qmi_wwan_mac_addr(struct net_device *dev, void *p)
  650. {
  651. int ret;
  652. struct sockaddr *addr = p;
  653. ret = eth_prepare_mac_addr_change(dev, p);
  654. if (ret < 0)
  655. return ret;
  656. if (possibly_iphdr(addr->sa_data))
  657. return -EADDRNOTAVAIL;
  658. eth_commit_mac_addr_change(dev, p);
  659. return 0;
  660. }
  661. static const struct net_device_ops qmi_wwan_netdev_ops = {
  662. .ndo_open = usbnet_open,
  663. .ndo_stop = usbnet_stop,
  664. .ndo_start_xmit = usbnet_start_xmit,
  665. .ndo_tx_timeout = usbnet_tx_timeout,
  666. .ndo_change_mtu = usbnet_change_mtu,
  667. .ndo_set_mac_address = qmi_wwan_mac_addr,
  668. .ndo_validate_addr = eth_validate_addr,
  669. #if defined(QUECTEL_WWAN_QMAP) && defined(CONFIG_ANDROID)
  670. .ndo_do_ioctl = qmap_ndo_do_ioctl,
  671. #endif
  672. };
  673. /* using a counter to merge subdriver requests with our own into a
  674. * combined state
  675. */
  676. static int qmi_wwan_manage_power(struct usbnet *dev, int on)
  677. {
  678. struct qmi_wwan_state *info = (void *)&dev->data;
  679. int rv;
  680. dev_dbg(&dev->intf->dev, "%s() pmcount=%d, on=%d\n", __func__,
  681. atomic_read(&info->pmcount), on);
  682. if ((on && atomic_add_return(1, &info->pmcount) == 1) ||
  683. (!on && atomic_dec_and_test(&info->pmcount))) {
  684. /* need autopm_get/put here to ensure the usbcore sees
  685. * the new value
  686. */
  687. rv = usb_autopm_get_interface(dev->intf);
  688. dev->intf->needs_remote_wakeup = on;
  689. if (!rv)
  690. usb_autopm_put_interface(dev->intf);
  691. }
  692. return 0;
  693. }
  694. static int qmi_wwan_cdc_wdm_manage_power(struct usb_interface *intf, int on)
  695. {
  696. struct usbnet *dev = usb_get_intfdata(intf);
  697. /* can be called while disconnecting */
  698. if (!dev)
  699. return 0;
  700. return qmi_wwan_manage_power(dev, on);
  701. }
  702. /* collect all three endpoints and register subdriver */
  703. static int qmi_wwan_register_subdriver(struct usbnet *dev)
  704. {
  705. int rv;
  706. struct usb_driver *subdriver = NULL;
  707. struct qmi_wwan_state *info = (void *)&dev->data;
  708. /* collect bulk endpoints */
  709. rv = usbnet_get_endpoints(dev, info->data);
  710. if (rv < 0)
  711. goto err;
  712. /* update status endpoint if separate control interface */
  713. if (info->control != info->data)
  714. dev->status = &info->control->cur_altsetting->endpoint[0];
  715. /* require interrupt endpoint for subdriver */
  716. if (!dev->status) {
  717. rv = -EINVAL;
  718. goto err;
  719. }
  720. /* for subdriver power management */
  721. atomic_set(&info->pmcount, 0);
  722. /* register subdriver */
  723. subdriver = usb_cdc_wdm_register(info->control, &dev->status->desc,
  724. 4096, &qmi_wwan_cdc_wdm_manage_power);
  725. if (IS_ERR(subdriver)) {
  726. dev_err(&info->control->dev, "subdriver registration failed\n");
  727. rv = PTR_ERR(subdriver);
  728. goto err;
  729. }
  730. /* prevent usbnet from using status endpoint */
  731. dev->status = NULL;
  732. /* save subdriver struct for suspend/resume wrappers */
  733. info->subdriver = subdriver;
  734. err:
  735. return rv;
  736. }
  737. static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf)
  738. {
  739. int status = -1;
  740. u8 *buf = intf->cur_altsetting->extra;
  741. int len = intf->cur_altsetting->extralen;
  742. struct usb_interface_descriptor *desc = &intf->cur_altsetting->desc;
  743. struct usb_cdc_union_desc *cdc_union = NULL;
  744. struct usb_cdc_ether_desc *cdc_ether = NULL;
  745. u32 found = 0;
  746. struct usb_driver *driver = driver_of(intf);
  747. struct qmi_wwan_state *info = (void *)&dev->data;
  748. BUILD_BUG_ON((sizeof(((struct usbnet *)0)->data) <
  749. sizeof(struct qmi_wwan_state)));
  750. /* set up initial state */
  751. info->control = intf;
  752. info->data = intf;
  753. /* and a number of CDC descriptors */
  754. while (len > 3) {
  755. struct usb_descriptor_header *h = (void *)buf;
  756. /* ignore any misplaced descriptors */
  757. if (h->bDescriptorType != USB_DT_CS_INTERFACE)
  758. goto next_desc;
  759. /* buf[2] is CDC descriptor subtype */
  760. switch (buf[2]) {
  761. case USB_CDC_HEADER_TYPE:
  762. if (found & 1 << USB_CDC_HEADER_TYPE) {
  763. dev_dbg(&intf->dev, "extra CDC header\n");
  764. goto err;
  765. }
  766. if (h->bLength != sizeof(struct usb_cdc_header_desc)) {
  767. dev_dbg(&intf->dev, "CDC header len %u\n",
  768. h->bLength);
  769. goto err;
  770. }
  771. break;
  772. case USB_CDC_UNION_TYPE:
  773. if (found & 1 << USB_CDC_UNION_TYPE) {
  774. dev_dbg(&intf->dev, "extra CDC union\n");
  775. goto err;
  776. }
  777. if (h->bLength != sizeof(struct usb_cdc_union_desc)) {
  778. dev_dbg(&intf->dev, "CDC union len %u\n",
  779. h->bLength);
  780. goto err;
  781. }
  782. cdc_union = (struct usb_cdc_union_desc *)buf;
  783. break;
  784. case USB_CDC_ETHERNET_TYPE:
  785. if (found & 1 << USB_CDC_ETHERNET_TYPE) {
  786. dev_dbg(&intf->dev, "extra CDC ether\n");
  787. goto err;
  788. }
  789. if (h->bLength != sizeof(struct usb_cdc_ether_desc)) {
  790. dev_dbg(&intf->dev, "CDC ether len %u\n",
  791. h->bLength);
  792. goto err;
  793. }
  794. cdc_ether = (struct usb_cdc_ether_desc *)buf;
  795. break;
  796. }
  797. /* Remember which CDC functional descriptors we've seen. Works
  798. * for all types we care about, of which USB_CDC_ETHERNET_TYPE
  799. * (0x0f) is the highest numbered
  800. */
  801. if (buf[2] < 32)
  802. found |= 1 << buf[2];
  803. next_desc:
  804. len -= h->bLength;
  805. buf += h->bLength;
  806. }
  807. /* Use separate control and data interfaces if we found a CDC Union */
  808. if (cdc_union) {
  809. info->data = usb_ifnum_to_if(dev->udev,
  810. cdc_union->bSlaveInterface0);
  811. if (desc->bInterfaceNumber != cdc_union->bMasterInterface0 ||
  812. !info->data) {
  813. dev_err(&intf->dev,
  814. "bogus CDC Union: master=%u, slave=%u\n",
  815. cdc_union->bMasterInterface0,
  816. cdc_union->bSlaveInterface0);
  817. goto err;
  818. }
  819. }
  820. /* errors aren't fatal - we can live with the dynamic address */
  821. if (cdc_ether) {
  822. dev->hard_mtu = le16_to_cpu(cdc_ether->wMaxSegmentSize);
  823. usbnet_get_ethernet_addr(dev, cdc_ether->iMACAddress);
  824. }
  825. /* claim data interface and set it up */
  826. if (info->control != info->data) {
  827. status = usb_driver_claim_interface(driver, info->data, dev);
  828. if (status < 0)
  829. goto err;
  830. }
  831. status = qmi_wwan_register_subdriver(dev);
  832. if (status < 0 && info->control != info->data) {
  833. usb_set_intfdata(info->data, NULL);
  834. usb_driver_release_interface(driver, info->data);
  835. }
  836. /* Never use the same address on both ends of the link, even
  837. * if the buggy firmware told us to.
  838. */
  839. if (ether_addr_equal(dev->net->dev_addr, default_modem_addr))
  840. eth_hw_addr_random(dev->net);
  841. /* make MAC addr easily distinguishable from an IP header */
  842. if (possibly_iphdr(dev->net->dev_addr)) {
  843. dev->net->dev_addr[0] |= 0x02; /* set local assignment bit */
  844. dev->net->dev_addr[0] &= 0xbf; /* clear "IP" bit */
  845. }
  846. dev->net->netdev_ops = &qmi_wwan_netdev_ops;
  847. #if 1 //Added by Quectel
  848. if (dev->driver_info->flags & FLAG_NOARP) {
  849. dev_info(&intf->dev, "Quectel EC25&EC21&EG91&EG95&EG06&EP06&EM06&EG12&EP12&EM12&EG16&EG18&BG96&AG35 work on RawIP mode\n");
  850. dev->net->flags |= IFF_NOARP;
  851. usb_control_msg(
  852. interface_to_usbdev(intf),
  853. usb_sndctrlpipe(interface_to_usbdev(intf), 0),
  854. 0x22, //USB_CDC_REQ_SET_CONTROL_LINE_STATE
  855. 0x21, //USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE
  856. 1, //active CDC DTR
  857. intf->cur_altsetting->desc.bInterfaceNumber,
  858. NULL, 0, 100);
  859. }
  860. //to advoid module report mtu 1460, but rx 1500 bytes IP packets, and cause the customer's system crash
  861. //next setting can make usbnet.c:usbnet_change_mtu() do not modify rx_urb_size according to hard mtu
  862. dev->rx_urb_size = ETH_DATA_LEN + ETH_HLEN + 6;
  863. #if defined(QUECTEL_WWAN_QMAP)
  864. if (qmap_mode > QUECTEL_WWAN_QMAP)
  865. qmap_mode = QUECTEL_WWAN_QMAP;
  866. if (!status)
  867. {
  868. sQmiWwanQmap *pQmapDev = (sQmiWwanQmap *)kzalloc(sizeof(sQmiWwanQmap), GFP_KERNEL);
  869. if (pQmapDev == NULL)
  870. return -ENODEV;
  871. #ifdef QUECTEL_BRIDGE_MODE
  872. pQmapDev->bridge_mode = bridge_mode;
  873. #endif
  874. pQmapDev->mpNetDev = dev;
  875. pQmapDev->link_state = 1;
  876. if (dev->driver_info->flags & FLAG_NOARP)
  877. {
  878. int idProduct = le16_to_cpu(dev->udev->descriptor.idProduct);
  879. int lte_a = (idProduct == 0x0306 || idProduct == 0x0512 || idProduct == 0x0620 || idProduct == 0x0800);
  880. pQmapDev->qmap_mode = qmap_mode;
  881. if (lte_a || dev->udev->speed == USB_SPEED_SUPER) {
  882. if (pQmapDev->qmap_mode == 0) {
  883. pQmapDev->qmap_mode = 1; //force use QMAP
  884. if(qmap_mode == 0)
  885. qmap_mode = 1; //old quectel-CM only check sys/module/wwan0/parameters/qmap_mode
  886. }
  887. }
  888. if (pQmapDev->qmap_mode) {
  889. if (idProduct == 0x0121 || idProduct == 0x0125 || idProduct == 0x0435) //MDM9x07
  890. dev->rx_urb_size = 4*1024;
  891. else if (lte_a || dev->udev->speed == USB_SPEED_SUPER)
  892. dev->rx_urb_size = 32*1024;
  893. else
  894. dev->rx_urb_size = 32*1024;
  895. //for these modules, if send pakcet before qmi_start_network, or cause host PC crash, or cause modules crash
  896. if (lte_a || dev->udev->speed == USB_SPEED_SUPER)
  897. pQmapDev->link_state = 0;
  898. }
  899. }
  900. info->unused = (unsigned long)pQmapDev;
  901. dev->net->sysfs_groups[0] = &qmi_wwan_sysfs_attr_group;
  902. dev_info(&intf->dev, "rx_urb_size = %zd\n", dev->rx_urb_size);
  903. }
  904. #endif
  905. #endif
  906. err:
  907. return status;
  908. }
  909. static void qmi_wwan_unbind(struct usbnet *dev, struct usb_interface *intf)
  910. {
  911. struct qmi_wwan_state *info = (void *)&dev->data;
  912. struct usb_driver *driver = driver_of(intf);
  913. struct usb_interface *other;
  914. if (info->subdriver && info->subdriver->disconnect)
  915. info->subdriver->disconnect(info->control);
  916. /* allow user to unbind using either control or data */
  917. if (intf == info->control)
  918. other = info->data;
  919. else
  920. other = info->control;
  921. /* only if not shared */
  922. if (other && intf != other) {
  923. usb_set_intfdata(other, NULL);
  924. usb_driver_release_interface(driver, other);
  925. }
  926. info->subdriver = NULL;
  927. info->data = NULL;
  928. info->control = NULL;
  929. }
  930. /* suspend/resume wrappers calling both usbnet and the cdc-wdm
  931. * subdriver if present.
  932. *
  933. * NOTE: cdc-wdm also supports pre/post_reset, but we cannot provide
  934. * wrappers for those without adding usbnet reset support first.
  935. */
  936. static int qmi_wwan_suspend(struct usb_interface *intf, pm_message_t message)
  937. {
  938. struct usbnet *dev = usb_get_intfdata(intf);
  939. struct qmi_wwan_state *info = (void *)&dev->data;
  940. int ret;
  941. /* Both usbnet_suspend() and subdriver->suspend() MUST return 0
  942. * in system sleep context, otherwise, the resume callback has
  943. * to recover device from previous suspend failure.
  944. */
  945. ret = usbnet_suspend(intf, message);
  946. if (ret < 0)
  947. goto err;
  948. if (intf == info->control && info->subdriver &&
  949. info->subdriver->suspend)
  950. ret = info->subdriver->suspend(intf, message);
  951. if (ret < 0)
  952. usbnet_resume(intf);
  953. err:
  954. return ret;
  955. }
  956. static int qmi_wwan_resume(struct usb_interface *intf)
  957. {
  958. struct usbnet *dev = usb_get_intfdata(intf);
  959. struct qmi_wwan_state *info = (void *)&dev->data;
  960. int ret = 0;
  961. bool callsub = (intf == info->control && info->subdriver &&
  962. info->subdriver->resume);
  963. if (callsub)
  964. ret = info->subdriver->resume(intf);
  965. if (ret < 0)
  966. goto err;
  967. ret = usbnet_resume(intf);
  968. if (ret < 0 && callsub)
  969. info->subdriver->suspend(intf, PMSG_SUSPEND);
  970. err:
  971. return ret;
  972. }
  973. static int qmi_wwan_reset_resume(struct usb_interface *intf)
  974. {
  975. dev_info(&intf->dev, "device do not support reset_resume\n");
  976. intf->needs_binding = 1;
  977. return -EOPNOTSUPP;
  978. }
  979. static const struct driver_info qmi_wwan_info = {
  980. .description = "WWAN/QMI device",
  981. .flags = FLAG_WWAN,
  982. .bind = qmi_wwan_bind,
  983. .unbind = qmi_wwan_unbind,
  984. .manage_power = qmi_wwan_manage_power,
  985. .rx_fixup = qmi_wwan_rx_fixup,
  986. };
  987. static const struct driver_info qmi_wwan_raw_ip_info = {
  988. .description = "WWAN/QMI device",
  989. .flags = FLAG_WWAN | FLAG_RX_ASSEMBLE | FLAG_NOARP | FLAG_SEND_ZLP,
  990. .bind = qmi_wwan_bind,
  991. .unbind = qmi_wwan_unbind,
  992. .manage_power = qmi_wwan_manage_power,
  993. #if defined(QUECTEL_WWAN_QMAP)
  994. .tx_fixup = qmap_qmi_wwan_tx_fixup,
  995. .rx_fixup = qmap_qmi_wwan_rx_fixup,
  996. #else
  997. .tx_fixup = qmi_wwan_tx_fixup,
  998. .rx_fixup = qmi_wwan_rx_fixup,
  999. #endif
  1000. };
  1001. /* map QMI/wwan function by a fixed interface number */
  1002. #define QMI_FIXED_INTF(vend, prod, num) \
  1003. USB_DEVICE_INTERFACE_NUMBER(vend, prod, num), \
  1004. .driver_info = (unsigned long)&qmi_wwan_info
  1005. #define QMI_FIXED_RAWIP_INTF(vend, prod, num) \
  1006. USB_DEVICE_INTERFACE_NUMBER(vend, prod, num), \
  1007. .driver_info = (unsigned long)&qmi_wwan_raw_ip_info
  1008. static const struct usb_device_id products[] = {
  1009. #if 1 //Added by Quectel
  1010. { QMI_FIXED_INTF(0x05C6, 0x9003, 4) }, /* Quectel UC20 */
  1011. { QMI_FIXED_INTF(0x05C6, 0x9215, 4) }, /* Quectel EC20 (MDM9215) */
  1012. { QMI_FIXED_RAWIP_INTF(0x2C7C, 0x0125, 4) }, /* Quectel EC20 (MDM9X07)/EC25/EG25 */
  1013. { QMI_FIXED_RAWIP_INTF(0x2C7C, 0x0121, 4) }, /* Quectel EC21 */
  1014. { QMI_FIXED_RAWIP_INTF(0x2C7C, 0x0191, 4) }, /* Quectel EG91 */
  1015. { QMI_FIXED_RAWIP_INTF(0x2C7C, 0x0195, 4) }, /* Quectel EG95 */
  1016. { QMI_FIXED_RAWIP_INTF(0x2C7C, 0x0306, 4) }, /* Quectel EG06/EP06/EM06 */
  1017. { QMI_FIXED_RAWIP_INTF(0x2C7C, 0x0512, 4) }, /* Quectel EG12/EP12/EM12/EG16/EG18 */
  1018. { QMI_FIXED_RAWIP_INTF(0x2C7C, 0x0296, 4) }, /* Quectel BG96 */
  1019. { QMI_FIXED_RAWIP_INTF(0x2C7C, 0x0435, 4) }, /* Quectel AG35 */
  1020. { QMI_FIXED_RAWIP_INTF(0x2C7C, 0x0620, 4) }, /* Quectel EG20 */
  1021. { QMI_FIXED_RAWIP_INTF(0x2C7C, 0x0800, 4) }, /* Quectel RG500 */
  1022. #endif
  1023. { } /* END */
  1024. };
  1025. MODULE_DEVICE_TABLE(usb, products);
  1026. static int qmi_wwan_probe(struct usb_interface *intf,
  1027. const struct usb_device_id *prod)
  1028. {
  1029. struct usb_device_id *id = (struct usb_device_id *)prod;
  1030. /* Workaround to enable dynamic IDs. This disables usbnet
  1031. * blacklisting functionality. Which, if required, can be
  1032. * reimplemented here by using a magic "blacklist" value
  1033. * instead of 0 in the static device id table
  1034. */
  1035. if (!id->driver_info) {
  1036. dev_dbg(&intf->dev, "setting defaults for dynamic device id\n");
  1037. id->driver_info = (unsigned long)&qmi_wwan_info;
  1038. }
  1039. if (intf->cur_altsetting->desc.bInterfaceClass != 0xff) {
  1040. dev_info(&intf->dev, "Quectel module not qmi_wwan mode! please check 'at+qcfg=\"usbnet\"'\n");
  1041. return -ENODEV;
  1042. }
  1043. return usbnet_probe(intf, id);
  1044. }
  1045. #if defined(QUECTEL_WWAN_QMAP)
  1046. static int qmap_qmi_wwan_probe(struct usb_interface *intf,
  1047. const struct usb_device_id *prod)
  1048. {
  1049. int status = qmi_wwan_probe(intf, prod);
  1050. if (!status) {
  1051. struct usbnet *dev = usb_get_intfdata(intf);
  1052. struct qmi_wwan_state *info = (void *)&dev->data;
  1053. sQmiWwanQmap *pQmapDev = (sQmiWwanQmap *)info->unused;
  1054. unsigned i;
  1055. if (pQmapDev) {
  1056. if (pQmapDev->qmap_mode == 1) {
  1057. pQmapDev->mpQmapNetDev[0] = dev->net;
  1058. }
  1059. else if (pQmapDev->qmap_mode > 1) {
  1060. for (i = 0; i < pQmapDev->qmap_mode; i++) {
  1061. qmap_register_device(pQmapDev, i);
  1062. }
  1063. }
  1064. }
  1065. }
  1066. return status;
  1067. }
  1068. static void qmap_qmi_wwan_disconnect(struct usb_interface *intf)
  1069. {
  1070. struct usbnet *dev = usb_get_intfdata(intf);
  1071. struct qmi_wwan_state *info = (void *)&dev->data;
  1072. sQmiWwanQmap *pQmapDev = (sQmiWwanQmap *)info->unused;
  1073. if (pQmapDev) {
  1074. if (pQmapDev->qmap_mode > 1) {
  1075. unsigned i;
  1076. for (i = 0; i < pQmapDev->qmap_mode; i++) {
  1077. qmap_unregister_device(pQmapDev, i);
  1078. }
  1079. }
  1080. kfree(pQmapDev);
  1081. }
  1082. usbnet_disconnect(intf);
  1083. }
  1084. #endif
  1085. static struct usb_driver qmi_wwan_driver = {
  1086. .name = "qmi_wwan_q",
  1087. .id_table = products,
  1088. .probe = qmi_wwan_probe,
  1089. #if defined(QUECTEL_WWAN_QMAP)
  1090. .probe = qmap_qmi_wwan_probe,
  1091. .disconnect = qmap_qmi_wwan_disconnect,
  1092. #else
  1093. .probe = qmi_wwan_probe,
  1094. .disconnect = usbnet_disconnect,
  1095. #endif
  1096. .suspend = qmi_wwan_suspend,
  1097. .resume = qmi_wwan_resume,
  1098. .reset_resume = qmi_wwan_reset_resume,
  1099. .supports_autosuspend = 1,
  1100. .disable_hub_initiated_lpm = 1,
  1101. };
  1102. module_usb_driver(qmi_wwan_driver);
  1103. MODULE_AUTHOR("Bjørn Mork <bjorn@mork.no>");
  1104. MODULE_DESCRIPTION("Qualcomm MSM Interface (QMI) WWAN driver");
  1105. MODULE_LICENSE("GPL");
  1106. #define QUECTEL_WWAN_VERSION "Quectel_Linux&Android_QMI_WWAN_Driver_V1.1"
  1107. MODULE_VERSION(QUECTEL_WWAN_VERSION);

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/611921
推荐阅读
相关标签
  

闽ICP备14008679号