source: src/router/libutils/lib3g.c @ 31861

Last change on this file since 31861 was 31861, checked in by brainslayer, 4 months ago

may reduce codesize

File size: 96.6 KB
Line 
1/*
2 * lib3g.c
3 *
4 * Copyright (C) 2009 Sebastian Gottschall <gottschall@dd-wrt.com>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19 *
20 * $Id:
21 * this module detects various special 3G/CDMA USB Devices which is required to handle them correct, since some devices
22 * are using non standard tty interfaces. everything which is not handled here in this list, is supported by the default tty handling which means dialin on tty0
23 */
24#include <sys/stat.h>
25#include <stdio.h>
26#include <stdlib.h>
27#include <shutils.h>
28#include <utils.h>
29#include <bcmnvram.h>
30
31#define HSO 0xfe
32#define NODEV 0xff
33
34struct DEVICES {
35        int vendor;
36        int product;
37        char *driver;
38        unsigned char controldevice;
39        unsigned char datadevice;
40        unsigned char modeswitch;
41        void (*customsetup) (int needreset, int devicecount);
42        char *name;
43};
44
45static struct DEVICES devicelist[];
46
47static int scanFor(int Vendor, int Product)
48{
49#if defined(ARCH_broadcom) && !defined(HAVE_BCMMODERN)
50        char grepstr[128];
51        sprintf(grepstr, "grep Vendor=%x ProdID=%x /tmp/usb/devices|wc -l", Vendor, Product);
52        FILE *check = popen(grepstr, "r");
53        if (check) {
54                int count = 0;
55                fscanf(check, "%d", &count);
56                pclose(check);
57                if (count > 0) {
58                        eval("umount", "/tmp/usb");
59                        return 1;
60                }
61        }
62        return 0;
63#else
64        int count = 1;
65        int hub = 1;
66        while (hub < 5) {
67                char sysfs[64];
68                sprintf(sysfs, "/sys/bus/usb/devices/%d-0:1.0/bInterfaceNumber", count);
69                FILE *probe = fopen(sysfs, "rb");
70                if (!probe) {
71                        count = 1;
72                        hub++;
73                        goto next;
74                }
75                fclose(probe);
76                int i;
77                for (i = 0; i < 9; i++) {
78                        if (!i)
79                                sprintf(sysfs, "/sys/bus/usb/devices/%d-%d/idProduct", count, hub);
80                        else
81                                sprintf(sysfs, "/sys/bus/usb/devices/%d-%d.%d/idProduct", count, hub, i);
82                        FILE *modem = fopen(sysfs, "rb");
83                        if (!modem) {
84                                goto next_if;
85                        }
86                        int idProduct;
87                        int idVendor;
88                        fscanf(modem, "%X", &idProduct);
89                        fclose(modem);
90                        if (!i)
91                                sprintf(sysfs, "/sys/bus/usb/devices/%d-%d/idVendor", count, hub);
92                        else
93                                sprintf(sysfs, "/sys/bus/usb/devices/%d-%d.%d/idVendor", count, hub, i);
94                        modem = fopen(sysfs, "rb");
95                        if (!modem) {
96                                goto next_if;
97                        }
98                        fscanf(modem, "%X", &idVendor);
99                        fclose(modem);
100                        if (idVendor == Vendor && idProduct == Product)
101                                return 1;
102                      next_if:;
103                }
104                count++;
105              next:;
106        }
107        return 0;
108#endif
109}
110
111void checkreset(unsigned char tty)
112{
113        char tts[32];
114        sprintf(tts, "/dev/usb/tts/%d", tty);
115        eval("comgt", "-d", tts, "-s", "/etc/comgt/reset.comgt");
116        FILE *check = NULL;
117        int count = 0;
118        sleep(1);
119        while (!(check = fopen(tts, "rb")) && count < 10) {
120                sleep(1);
121                count++;
122        }
123        if (check)
124                fclose(check);
125        else {
126                fprintf(stderr, "reset error\n");
127#ifdef HAVE_UNIWIP
128                rmmod("fsl-mph-dr-of");
129                sleep(1);
130                insmod("fsl-mph-dr-of");
131                sleep(5);
132#endif
133        }
134        fprintf(stderr, "wakeup card\n");
135        eval("comgt", "-d", tts, "-s", "/etc/comgt/wakeup.comgt");
136#ifdef HAVE_UNIWIP
137        sleep(10);              //give extra delay for registering
138#else
139        sleep(5);               //give extra delay for registering
140#endif
141}
142
143static void reset_mc(int needreset, int devicecount)
144{
145        if (needreset)
146                checkreset(devicelist[devicecount].controldevice);
147}
148
149static void modeswitch_rezero(int needreset, int devicecount)
150{
151        FILE *out;
152        out = fopen("/tmp/usb_modeswitch.conf", "wb");
153        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
154        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
155        fprintf(out, "OptionMode=1\n");
156        fclose(out);
157        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
158
159        sleep(3);
160}
161
162static void select_config1(int needreset, int devicecount)
163{
164        FILE *out;
165        out = fopen("/tmp/usb_modeswitch.conf", "wb");
166        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
167        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
168        fprintf(out, "Configuration=1\n");
169        fclose(out);
170        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
171}
172
173static void select_config2(int needreset, int devicecount)
174{
175        FILE *out;
176        out = fopen("/tmp/usb_modeswitch.conf", "wb");
177        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
178        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
179        fprintf(out, "Configuration=2\n");
180        fclose(out);
181        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
182}
183
184static void select_config3(int needreset, int devicecount)
185{
186        FILE *out;
187        out = fopen("/tmp/usb_modeswitch.conf", "wb");
188        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
189        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
190        fprintf(out, "Configuration=3\n");
191        fclose(out);
192        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
193}
194
195static void modeswitch_std_eject(int needreset, int devicecount)
196{
197        FILE *out;
198        out = fopen("/tmp/usb_modeswitch.conf", "wb");
199        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
200        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
201        fprintf(out, "StandardEject=1\n");
202        fclose(out);
203        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
204}
205
206static void modeswitch_quanta(int needreset, int devicecount)
207{
208        FILE *out;
209        out = fopen("/tmp/usb_modeswitch.conf", "wb");
210        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
211        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
212        fprintf(out, "QuantaMode=1\n");
213        fclose(out);
214        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
215}
216
217static void modeswitch_curitel(int needreset, int devicecount)
218{
219        eval("usb_modeswitch", "-v", "0x106c", "-p", "0x3b03", "-M", "555342431234567824000000800008ff024445564348470000000000000000");
220        eval("usb_modeswitch", "-v", "0x106c", "-p", "0x3b05", "-M", "555342431234567824000000800008ff020000000000000000000000000000");
221        eval("usb_modeswitch", "-v", "0x106c", "-p", "0x3b06", "-M", "555342431234567824000000800008ff020000000000000000000000000000");
222        eval("usb_modeswitch", "-v", "0x106c", "-p", "0x3b11", "-M", "555342431234567824000000800008ff024445564348470000000000000000");
223        eval("usb_modeswitch", "-v", "0x106c", "-p", "0x3b14", "-M", "555342431234567824000000800008ff024445564348470000000000000000");
224}
225
226static void modeswitch_sierra(int needreset, int devicecount)
227{
228        FILE *out;
229        out = fopen("/tmp/usb_modeswitch.conf", "wb");
230        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
231        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
232        fprintf(out, "SierraMode=1\n");
233        fclose(out);
234        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
235        sleep(5);               // give Sierra additional time
236}
237
238static void modeswitch_huawei_old(int needreset, int devicecount)
239{
240        FILE *out;
241        out = fopen("/tmp/usb_modeswitch.conf", "wb");
242        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
243        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
244        fprintf(out, "HuaweiMode=1\n");
245        fclose(out);
246        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
247}
248
249static void modeswitch_huawei_std(int needreset, int devicecount)
250{
251        FILE *out;
252        out = fopen("/tmp/usb_modeswitch.conf", "wb");
253        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
254        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
255        fprintf(out, "HuaweiNewMode=1\n");
256        fclose(out);
257        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
258}
259
260static void modeswitch_devchg_fe(int needreset, int devicecount)
261{
262        FILE *out;
263        out = fopen("/tmp/usb_modeswitch.conf", "wb");
264        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
265        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
266        fprintf(out, "MessageContent=\"555342431234567824000000800008fe524445564348470000000000000000\"\n");
267        fclose(out);
268        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
269}
270
271static void modeswitch_devchg_ff(int needreset, int devicecount)
272{
273        FILE *out;
274        out = fopen("/tmp/usb_modeswitch.conf", "wb");
275        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
276        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
277        fprintf(out, "MessageContent=\"555342431234567824000000800008ff524445564348470000000000000000\"\n");
278        fclose(out);
279        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
280}
281
282static void modeswitch_devchg1(int needreset, int devicecount)
283{
284        FILE *out;
285        out = fopen("/tmp/usb_modeswitch.conf", "wb");
286        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
287        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
288        fprintf(out, "MessageContent=\"555342431234567824000000800009ff524445564348473100000000000000\"\n");
289        fclose(out);
290        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
291}
292
293static void modeswitch_zte(int needreset, int devicecount)
294{
295        FILE *out;
296        out = fopen("/tmp/usb_modeswitch.conf", "wb");
297        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
298        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
299        fprintf(out, "StandardEject=1\n");
300        fprintf(out, "MessageContent=\"55534243123456702000000080000c85010101180101010101000000000000\"\n");
301        fclose(out);
302        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
303}
304
305static void modeswitch_alcatel(int needreset, int devicecount)
306{
307        FILE *out;
308        out = fopen("/tmp/usb_modeswitch.conf", "wb");
309        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
310        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
311        fprintf(out, "MessageContent=\"55534243123456788000000080000606f50402527000000000000000000000\"\n");
312        fprintf(out, "MessageContent2=\"55534243123456788000000080010606f50402527000000000000000000000\"\n");
313        fprintf(out, "CheckSuccess=20\n");
314        fclose(out);
315        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
316}
317
318static void modeswitch_onda(int needreset, int devicecount)
319{
320        FILE *out;
321        out = fopen("/tmp/usb_modeswitch.conf", "wb");
322        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
323        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
324        fprintf(out, "MessageContent=\"555342431234567800000000000010ff000000000000000000000000000000\"\n");
325        fprintf(out, "NeedResponse=1\n");
326        fclose(out);
327        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
328}
329
330static void modeswitch_mediatek(int needreset, int devicecount)
331{
332        FILE *out;
333        out = fopen("/tmp/usb_modeswitch.conf", "wb");
334        fprintf(out, "DefaultVendor=0x%04x\n", devicelist[devicecount].vendor);
335        fprintf(out, "DefaultProduct=0x%04x\n", devicelist[devicecount].product);
336        fprintf(out, "MessageContent=\"555342431234567800000000000003f0010100000000000000000000000000\"\n");
337        fprintf(out, "NeedResponse=1\n");
338        fclose(out);
339        eval("usb_modeswitch", "-c", "/tmp/usb_modeswitch.conf");
340}
341
342static void modeswitch_others(int needreset, int devicecount)
343{
344        eval("usb_modeswitch", "-v", "0x04fc", "-p", "0x2140", "-M", "55534243123456782400000080000612000024000000000000000000000000");
345        eval("usb_modeswitch", "-v", "0x07d1", "-p", "0xf000", "-M", "555342431234567800000000000006bd000000020000000000000000000000");
346        eval("usb_modeswitch", "-v", "0x10a9", "-p", "0x606f", "-F 4");
347        eval("usb_modeswitch", "-v", "0x10a9", "-p", "0x6080", "-F 2");
348        eval("usb_modeswitch", "-v", "0x19d2", "-p", "0x0166", "-M", "55534243123456782400000080000685000000240000000000000000000000");
349        eval("usb_modeswitch", "-v", "0x19d2", "-p", "0x0266", "-M", "55534243123456782400000080000685000000240000000000000000000000");
350        eval("usb_modeswitch", "-v", "0x19d2", "-p", "0x0388", "-M", "55534243123456782400000080000685000000240000000000000000000000");
351        eval("usb_modeswitch", "-v", "0x19d2", "-p", "0x0413", "-M", "55534243123456782400000080000685000000240000000000000000000000");
352        eval("usb_modeswitch", "-v", "0x19d2", "-p", "0xfff5", "-M", "5553424312345678c00000008000069f010000000000000000000000000000");
353        eval("usb_modeswitch", "-v", "0x19d2", "-p", "0xfff6", "-M", "5553424312345678c00000008000069f010000000000000000000000000000");
354        eval("usb_modeswitch", "-v", "0x1e0e", "-p", "0xf000", "-M", "555342431234567800000000000006bd000000020000000000000000000000");
355}
356
357#define QMIRAW 0x2000           // usbnet, qmi_wwan, cdc_wdm, rawip
358#define H_NCM 0x1000            // usbnet, cdc_ncm, huawei_cdc_ncm, cdc_wdm
359#define NCM 0x800               // usbnet, cdc_ncm, cdc_wdm
360#define MBIM 0x400              // usbnet, cdc_ncm, cdc_mbim,
361#define RNDIS 0x200             // usbnet, cdc_ether, rndis_host,
362#define S_NET 0x100             // usbnet, sierra_net (direct ip)
363#define QMI 0x80                // usbnet, qmi_wwan, cdc_wdm
364#define ETH 0x40                // usbnet, cdc_ether
365#define GENERIC 0x20            // option new_id on-the-fly
366#define ACM 0x10                // cdc_acm
367
368// 0-15 is variant type
369// 0 = No command
370// 1 = Sierra cmdset
371// 2 = Huawei cmdset
372// 3 = Option cmdset
373// 4 = ZTE cmdset
374// 5 =
375// 6 =
376// 7 =
377// 8 =
378// 9 =
379// 10 =
380// 11 =
381// 12 = ETH static ip
382// 13 = ETH dynamic ip
383// 14 = RNDIS UP/DOWN via tty
384// 15 = RNDIS UP/DOWN via cdc_wdm
385
386static struct DEVICES devicelist[] = {
387
388/* Quanta */
389        {0x0408, 0xea02, "option", 2, 0, 0, NULL, "Quanta MUQ-101 (modem)"},    //
390        {0x0408, 0xea03, "option", 2, 0, 0, NULL, "Quanta MUQ-110 (modem)"},    //
391        {0x0408, 0xea04, "option", 2, 0, 0, NULL, "Quanta GLX (modem)"},        //
392        {0x0408, 0xea05, "option", 2, 0, 0, NULL, "Quanta GKE (modem)"},        //
393        {0x0408, 0xea06, "option", 2, 0, 0, NULL, "Quanta GLE (modem)"},        //
394        {0x0408, 0xea16, "option", 1, 2, 0 | GENERIC, NULL, "Quanta 1KR (modem)"},      // also qmi but not yet in driver
395        {0x0408, 0xea17, "option", 0, 0, 2, &modeswitch_std_eject, "Quanta 1KR (cdrom)"},       //
396        {0x0408, 0xea25, "option", 0, 0, 2, &modeswitch_quanta, "Quanta 1K3 LTE (cdrom)"},      //
397        {0x0408, 0xea26, "option", 1, 2, 2 | GENERIC, NULL, "Quanta Mobility LTE (modem)"},     // also qmi but not yet in driver
398        {0x0408, 0xea42, "option", 3, 2, 0 | QMI, NULL, "Megafone M100-1 (modem)"},     //
399        {0x0408, 0xea43, "option", 0, 0, 2, &modeswitch_std_eject, "Quanta MobileGenie (cdrom)"},       //
400//      {0x0408, 0xea45, NULL, NODEV, NODEV, 0 | ETH, NULL, "Quanta 1K6E (modem)"},       //
401        {0x0408, 0xea47, "option", 3, 2, 2 | GENERIC, NULL, "Quanta MobileGenie (modem)"},      // also qmi but not yet in driver
402        {0x0408, 0xea49, "option", 0, 1, 2 | GENERIC, NULL, "Telsec TS-1K6 (modem)"},   // also qmi but not yet in driver
403        {0x0408, 0xf000, "option", 0, 0, 2, &modeswitch_quanta, "Quanta 1QDL (cdrom)"}, //
404        {0x0408, 0xf001, "option", 0, 0, 2, &modeswitch_quanta, "Quanta GLX, GLE,GKE (cdrom)"}, //
405
406/* Nokia Mobile Phones */
407        {0x0421, 0x03a7, "option", 0, 0, 2 | ACM, NULL, "Nokia C5-00 Mobile phone (modem)"},    //
408        {0x0421, 0x060c, "option", 0, 0, 2, &modeswitch_std_eject, "Nokia CS-10 (cdrom)"},      //
409        {0x0421, 0x060d, "option", 0, 0, 2 | ACM, NULL, "Nokia CS-10 (modem)"}, //
410        {0x0421, 0x060e, "option", 0, 0, 2 | ACM, NULL, "Nokia CS-10 (modem)"}, //
411        {0x0421, 0x0610, "option", 0, 0, 2, &modeswitch_std_eject, "Nokia CS-15 (cdrom)"},      //
412        {0x0421, 0x0612, "option", 0, 0, 2 | ACM, NULL, "Nokia CS-15/CS-18 (modem)"},   //
413        {0x0421, 0x0618, "option", 0, 0, 2, &modeswitch_std_eject, "Nokia CS-12 (cdrom)"},      //
414        {0x0421, 0x0619, "option", 0, 0, 2 | ACM, NULL, "Nokia CS-12 (modem)"}, //
415        {0x0421, 0x061d, "option", 0, 0, 2, &modeswitch_std_eject, "Nokia CS-11 (cdrom)"},      //
416        {0x0421, 0x061e, "option", 0, 0, 2 | ACM, NULL, "Nokia CS-11 (modem)"}, //
417        {0x0421, 0x0622, "option", 0, 0, 2, &modeswitch_std_eject, "Nokia CS-17 (cdrom)"},      //
418        {0x0421, 0x0623, "option", 0, 0, 2 | ACM, NULL, "Nokia CS-17 (modem)"}, //
419        {0x0421, 0x0627, "option", 0, 0, 2, &modeswitch_std_eject, "Nokia CS-18 (cdrom)"},      //
420        {0x0421, 0x0629, "option", 0, 0, 2 | ACM, NULL, "Nokia CS-18 (modem)"}, //
421        {0x0421, 0x062c, "option", 0, 0, 2, &modeswitch_std_eject, "Nokia CS-19 (cdrom)"},      //
422        {0x0421, 0x062d, "option", 0, 0, 2 | ACM, NULL, "Nokia CS-19 (modem)"}, //
423        {0x0421, 0x062f, "option", 0, 0, 2 | ACM, NULL, "Nokia CS-19 (modem)"}, //
424        {0x0421, 0x0632, "option", 0, 0, 2 | ACM, &modeswitch_std_eject, "Nokia 7M-01"},        //
425        {0x0421, 0x0637, "option", 0, 0, 2, &modeswitch_std_eject, "Nokia 21M-02 (cdrom)"},     //
426        {0x0421, 0x0638, "option", 0, 0, 2 | ACM, NULL, "Nokia 21M-02 (modem)"},        //
427        {0x0421, 0x0639, "option", 1, 0, 2 | ACM, NULL, "Nokia 21M-02 (modem)"},        //
428
429/* Philips/NXP */
430        {0x0471, 0x1206, "option", 0, 0, 2 | ACM, &select_config2, "Philips TalkTalk (modem)"}, //
431        {0x0471, 0x1210, "option", 0, 0, 2, &modeswitch_std_eject, "Vodaphone MD950 (cdrom)"},  //
432        {0x0471, 0x1237, "option", 0, 0, 2 | ACM, &select_config2, "Philips TalkTalk (modem)"}, //
433
434/* Kyocera */
435        {0x0482, 0x024d, "option", 0, 0, 2 | ACM, &select_config2, "Kyocera WK06"},     //
436
437/* ST-Ericsson */
438        {0x04cc, 0x2251, "option", 0, 0, 2, &modeswitch_std_eject, "Alcatel-Lucent"},   //
439        {0x04cc, 0x2259, "option", 0, 0, 2 | ACM, &select_config2, "Alcatel-Lucent T920S"},     //
440        {0x04cc, 0x225c, "option", 0, 0, 2 | ACM, &select_config2, "Alcatel-Lucent T930S"},     //
441        {0x04cc, 0x226e, "option", 0, 0, 2 | ACM, &select_config2, "Nexperia TM TD-SCDMA"},     //
442
443/* Sunplus */
444        {0x04fc, 0x0615, "option", 0, 0, 2 | ACM, NULL, "SU-3200U (modem)"},    //
445        {0x04fc, 0x1240, "option", 0, 0, 2 | ACM, NULL, "Mobidata MDB-100EU (modem)"},  //
446        {0x04fc, 0x2140, "option", 0, 0, 2, &modeswitch_others, "SU-3200U (cdrom)"},    //
447
448/* Qualcomm */
449        {0x05c6, 0x0010, "option", 0, 0, 0, &modeswitch_std_eject, "Generic Qualcomm (cdrom)"}, //
450        {0x05c6, 0x0016, "option", 2, 2, 0 | GENERIC, NULL, "iBall 3.5G Connect (modem)"},      //
451        {0x05c6, 0x0018, "option", 1, 3, 0 | GENERIC, NULL, "Advan DT9 SQ (modem)"},    //
452        {0x05c6, 0x0023, "option", 2, 0, 0, NULL, "Leoxsys LN-72V (modem)"},    //
453        {0x05c6, 0x00a0, "option", 2, 0, 0 | GENERIC, NULL, "Axesstel MV241 (modem)"},  //
454        {0x05c6, 0x1000, "option", 0, 0, 0, &modeswitch_std_eject, "Generic Qualcomm (cdrom)"}, //
455        {0x05c6, 0x2001, "option", 0, 0, 0, &modeswitch_std_eject, "Generic Qualcomm (cdrom)"}, //
456        {0x05c6, 0x3100, "option", 0, 0, 0 | ACM, NULL, "Maxon MM-5100 (modem)"},       //
457        {0x05c6, 0x3196, "option", 0, 0, 0 | ACM, NULL, "Maxon MM-5500 (modem)"},       //
458        {0x05c6, 0x3197, "option", 0, 0, 0 | GENERIC, NULL, "SpeedUp SU-6500U/SU-6600U (modem)"},       //
459        {0x05c6, 0x6000, "option", 2, 0, 0 | GENERIC, NULL, "Siemens SG75 (modem)"},    //
460        {0x05c6, 0x6280, "option", 2, 0, 0 | GENERIC, NULL, "Qualcomm generic (modem)"},        //
461        {0x05c6, 0x6500, "option", 2, 0, 0 | GENERIC, NULL, "Venus VT-80n (modem)"},    //
462        {0x05c6, 0x6503, "option", 0, 0, 0, &modeswitch_std_eject, "Generic Qualcomm (cdrom)"}, //
463        {0x05c6, 0x9000, "qcserial", 1, 2, 0 | QMI, NULL, "SIMCom SIM5218 (modem)"},    //
464        {0x05c6, 0x9003, "qcserial", 2, 3, 0 | QMI, NULL, "Quectel UC20 (modem)"},      //
465        {0x05c6, 0x9011, "qcserial", 1, 2, 0 | QMI, NULL, "Qualcomm HS-USB (modem)"},   //
466        {0x05c6, 0x9024, "qcserial", 0, 0, 0, &modeswitch_std_eject, "ASB TL131 TD-LTE (cdrom)"},       //
467        {0x05c6, 0x9025, "option", 2, 0, 0 | QMI, NULL, "ASB TL131 TD-LTE (modem)"},    //
468        {0x05c6, 0x9046, "qcserial", 1, 2, 0 | QMI, NULL, "Qualcomm HS-USB (modem)"},   //
469        {0x05c6, 0xf000, "option", 0, 0, 0, &modeswitch_std_eject, "Generic Qualcomm (cdrom)"}, //
470
471/* D-Link */
472        {0x07d1, 0x3e01, "option", 1, 0, 2, NULL, "D-Link DWM-152 C1 (modem)"}, //
473        {0x07d1, 0x3e02, "option", 1, 0, 2, NULL, "D-Link DWM-156 A1 (modem)"}, //
474        {0x07d1, 0x7e07, "option", 3, 3, 2 | GENERIC, NULL, "D-Link DWM-151 A1 (modem)"},       //
475        {0x07d1, 0x7e0c, "option", 2, 0, 2 | GENERIC, NULL, "D-Link DWM-156 A2 (modem)"},       //
476        {0x07d1, 0x7e11, "option", 1, 2, 2, NULL, "D-Link DWM-156 A3 (modem)"}, //
477        {0x07d1, 0xa800, "option", 0, 0, 0, &modeswitch_std_eject, "D-Link DWM-152 C1/DWM-156 A1 (cdrom)"},     //
478        {0x07d1, 0xa804, "option", 0, 0, 0, &modeswitch_std_eject, "D-Link DWM-156 A3 (cdrom)"},        //
479        {0x07d1, 0xf000, "option", 0, 0, 0, &modeswitch_others, "D-Link DWM-151 A1 (cdrom)"},   //
480
481/* Netgear */
482        {0x0846, 0x0fff, NULL, NODEV, NODEV, 1, &modeswitch_sierra, "Sierra Device (cdrom)"},   //
483        {0x0846, 0x68a2, "qcserial", 2, 0, 1 | QMI, NULL, "Sierra MC7710 (modem)"},     //
484//      {0x0846, 0x68d3, NULL, NODEV, NODEV, 1 | QMI, &select_config2, "Netgear AC778S (modem)"}, // not yet in driver
485//      {0x0846, 0x68e1, NULL, NODEV, NODEV, 1 | ETH, &select_config2, "Netgear AC785S (modem)"}, // rndis in default config1
486//      {0x0846, 0x68e2, NULL, NODEV, NODEV, 1 | ETH, &select_config2, "Netgear AC78xS (modem)"}, // rndis in default config1
487
488/* Toshiba */
489        {0x0930, 0x0d45, "option", 2, 0, 2, NULL, "Toshiba G450 (modem)"},      //
490        {0x0930, 0x0d46, "option", 0, 0, 0, &modeswitch_std_eject, "Toshiba G450 (cdrom)"},     //
491
492/* Option */
493        {0x0af0, 0x4005, "option", 2, 1, 0 | QMI, NULL, "Option GIO711"},       //
494        {0x0af0, 0x4007, NULL, 0, 0, 0, &modeswitch_sierra, "Option GIO711 (cdrom)"},   //
495//      {0x0af0, 0x6711, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GE201"},    //express card
496//      {0x0af0, 0x6731, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GE"},       //express card
497//      {0x0af0, 0x6751, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GE"},       //express card
498//      {0x0af0, 0x6771, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GE"},       //express card
499//      {0x0af0, 0x6791, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GE"},       //express card
500        {0x0af0, 0x6901, "option", 1, 0, 0, NULL, "Option GI0201"},     //usb
501        {0x0af0, 0x6911, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI0225"},       //usb
502        {0x0af0, 0x6951, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI0225"},       //usb
503        {0x0af0, 0x6971, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI0225"},       //usb
504//      {0x0af0, 0x7011, NULL, HSO, HSO, 2, &modeswitch_rezero, "Option GE301"},    //express card
505//      {0x0af0, 0x7031, NULL, HSO, HSO, 2, &modeswitch_rezero, "Option GE301"},    //express card
506//      {0x0af0, 0x7051, NULL, HSO, HSO, 2, &modeswitch_rezero, "Option GE301"},    //express card
507//      {0x0af0, 0x7071, NULL, HSO, HSO, 2, &modeswitch_rezero, "Option GE301"},    //express card
508        {0x0af0, 0x7111, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GTM"},  //pcie minicard
509        {0x0af0, 0x7201, "option", 1, 0, 0, NULL, "Option GTM380"},     //pcie minicard
510        {0x0af0, 0x7211, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GTM380"},       //pcie minicard
511        {0x0af0, 0x7251, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GTM380"},       //pcie minicard
512        {0x0af0, 0x7271, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GTM380"},       //pcie minicard
513//      {0x0af0, 0x7301, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GE040x"},   //express card
514        {0x0af0, 0x7311, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GTM040x"},      //pcie minicard
515//      {0x0af0, 0x7361, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GE044x"},   //express card
516//      {0x0af0, 0x7381, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GE044x"},   //express card
517        {0x0af0, 0x7401, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI0401"},       //usb
518        {0x0af0, 0x7501, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI0431"},       //usb
519//      {0x0af0, 0x7601, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GE040x"},   //express card
520        {0x0af0, 0x7701, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI0451"},       //usb
521        {0x0af0, 0x7706, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI0451"},       //usb
522        {0x0af0, 0x7801, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI04xx"},       //usb
523        {0x0af0, 0x7901, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI0452"},       //usb
524        {0x0af0, 0x7a01, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI0461"},       //usb
525        {0x0af0, 0x7a05, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI0461"},       //usb
526        {0x0af0, 0x8001, NULL, NODEV, NODEV, 0, &modeswitch_rezero, "Option GI1515"},   //zero footprint install id
527        {0x0af0, 0x8002, NULL, NODEV, NODEV, 0, &modeswitch_rezero, "Option GI1515"},   //zero footprint install id
528        {0x0af0, 0x8003, NULL, NODEV, NODEV, 0, &modeswitch_rezero, "Option GI1515"},   //zero footprint install id
529        {0x0af0, 0x8120, "qcserial", 3, 2, 3 | QMI, NULL, "Option GTM681W"},    //pcie minicard
530        {0x0af0, 0x8121, "qcserial", 3, 2, 3 | QMI, NULL, "Option GTM689W"},    //pcie minicard
531        {0x0af0, 0x8200, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI07xx"},       //usb
532        {0x0af0, 0x8201, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI07xx"},       //usb
533        {0x0af0, 0x8204, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI07xx"},       //usb
534        {0x0af0, 0x8300, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI033x"},       //usb
535        {0x0af0, 0x8302, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI033x"},       //usb
536        {0x0af0, 0x8304, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI033x"},       //usb
537//      {0x0af0, 0x8400, NULL, HSO, HSO, 0, &modeswitch_rezero, "Pioner JP1"},      //
538        {0x0af0, 0x8600, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI063x"},       //usb
539        {0x0af0, 0x8700, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI0643"},       //usb
540//      {0x0af0, 0x8701, NULL, NODEV, NODEV, 3 | ETH, NULL, "Option GI0643"},     //usb
541        {0x0af0, 0x8800, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GTM60x"},       //pcie minicard
542        {0x0af0, 0x8900, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GTM67x"},       //pcie minicard
543        {0x0af0, 0x9000, NULL, HSO, HSO, 3, &modeswitch_rezero, "Option GTM66x"},       //pcie minicard
544        {0x0af0, 0x9200, NULL, HSO, HSO, 0, NULL, "Option GTM671WFS"},  //pcie minicard
545        {0x0af0, 0xc031, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI031"},        //usb
546        {0x0af0, 0xc100, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI070x"},       //usb
547        {0x0af0, 0xd001, NULL, NODEV, NODEV, 0, &modeswitch_rezero, "Option GI1515"},   //zero footprint install id
548        {0x0af0, 0xd031, NULL, HSO, HSO, 0, &modeswitch_rezero, "Qualcomm ICON 321"},   //usb
549        {0x0af0, 0xd033, NULL, HSO, HSO, 0, &modeswitch_rezero, "Qualcomm ICON 322"},   //usb
550        {0x0af0, 0xd055, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI0505"},       //usb
551        {0x0af0, 0xd057, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI1505"},       //usb
552        {0x0af0, 0xd058, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI1509"},       //usb
553        {0x0af0, 0xd155, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI0505"},       //usb
554        {0x0af0, 0xd157, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI1515"},       //usb
555        {0x0af0, 0xd255, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI1215"},       //usb
556        {0x0af0, 0xd257, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI1215"},       //usb
557        {0x0af0, 0xd357, NULL, HSO, HSO, 0, &modeswitch_rezero, "Option GI1505"},       //usb
558
559/* Olivetti */
560        {0x0b3c, 0xc000, "option", 0, 0, 2 | QMI, NULL, "Olivetti Olicard 100"},        //
561        {0x0b3c, 0xc001, "option", 0, 0, 2 | QMI, NULL, "Olivetti Olicard 120"},        //
562        {0x0b3c, 0xc002, "option", 0, 0, 2 | QMI, NULL, "Olivetti Olicard 140"},        //
563        {0x0b3c, 0xc003, "option", 0, 4, 2, NULL, "Olivetti Olicard 145"},      //
564        {0x0b3c, 0xc004, "option", 0, 4, 2 | QMI, NULL, "Olivetti Olicard 155"},        //
565        {0x0b3c, 0xc005, "option", 0, 0, 2 | QMI, NULL, "Olivetti Olicard 200"},        //
566        {0x0b3c, 0xc00a, "option", 0, 4, 2 | QMI, NULL, "Olivetti Olicard 160"},        //
567        {0x0b3c, 0xc00b, "option", 0, 2, 2 | QMI, NULL, "Olivetti Olicard 500"},        //
568        {0x0b3c, 0xc700, "option", 0, 0, 0, &modeswitch_std_eject, "Olivetti Olicard 100 (cdrom)"},     //
569        {0x0b3c, 0xf000, "option", 0, 0, 0, &modeswitch_alcatel, "Olivetti Olicards (cdrom)"},  //
570        {0x0b3c, 0xf00c, "option", 0, 0, 0, &modeswitch_alcatel, "Olivetti Olicards (cdrom)"},  //
571        {0x0b3c, 0xf017, "option", 0, 0, 0, &modeswitch_std_eject, "Olivetti Olicard 500 (cdrom)"},     //
572
573/* Ericsson Business Mobile Networks */
574        {0x0bdb, 0x1900, "option", 0, 1, 0 | ACM, NULL, "Ericsson F3507g"},     //
575        {0x0bdb, 0x1902, "option", 0, 1, 0 | ACM, NULL, "Lenovo F3507g"},       //
576        {0x0bdb, 0x1904, "option", 0, 1, 0 | ACM, NULL, "Ericsson F3607gw"},    //
577        {0x0bdb, 0x1905, "option", 0, 1, 0 | ACM, NULL, "Lenovo F3607gw"},      //
578        {0x0bdb, 0x1906, "option", 0, 1, 0 | ACM, NULL, "Ericsson F3607gw"},    //
579        {0x0bdb, 0x1907, "option", 0, 1, 0 | ACM, NULL, "Lenovo F3607gw"},      //
580        {0x0bdb, 0x1909, "option", 0, 1, 0 | ACM, NULL, "Ericsson F3307"},      //
581        {0x0bdb, 0x190a, "option", 0, 1, 0 | ACM, NULL, "Ericsson F3307"},      //
582        {0x0bdb, 0x190d, "option", 0, 1, 0 | ACM, NULL, "Ericsson F5521gw"},    // also cdc_ncm
583        {0x0bdb, 0x190e, "option", 0, 1, 0 | ACM, NULL, "Lenovo F3307"},        //
584        {0x0bdb, 0x190f, "option", 0, 1, 0 | ACM, NULL, "Lenovo F3307"},        //
585        {0x0bdb, 0x1910, "option", 0, 1, 0 | ACM, NULL, "Lenovo F5521gw"},      // also cdc_ncm
586        {0x0bdb, 0x1911, "option", 0, 1, 0 | ACM, NULL, "Lenovo F5521gw"},      // also cdc_ncm
587
588/* Kyocera */
589        {0x0c88, 0x17da, "option", 0, 0, 0, NULL, "Kyocera KPC650"},    //
590        {0x0c88, 0x180a, "option", 0, 0, 0, NULL, "Kyocera KPC680"},    //
591
592/* Mediatek */
593        {0x0e8d, 0x0002, NULL, NODEV, NODEV, NULL, &modeswitch_mediatek, "MT6276"},     //
594        {0x0e8d, 0x00a1, "option", 1, 0, 2 | GENERIC, NULL, "MT6276"},  //
595        {0x0e8d, 0x00a2, "option", 1, 0, 2 | GENERIC, NULL, "MT6276"},  //
596        {0x0e8d, 0x00a4, "option", 1, 0, 2, NULL, "MT6276"},    //
597        {0x0e8d, 0x00a5, "option", 1, 0, 2, NULL, "Thinkwill UE980"},   // also cdc_mbim
598        {0x0e8d, 0x00a7, "option", 1, 0, 2, NULL, "Mediatek DC_4COM2"}, // also cdc_mbim
599
600/* AirPrime (Sierra) */
601        {0x0f3d, 0x68a2, "qcserial", 2, 0, 1 | QMI, NULL, "Sierra MC7700 (modem)"},     // also cdc_mbim
602        {0x0f3d, 0x68a3, "sierra", 3, 3, 1, &reset_mc, "Sierra Wireless MC8700/Compass Direct IP"},     //
603        {0x0f3d, 0x68aa, "sierra", 3, 3, 1, NULL, "Sierra Wireless AC313U/320U/330U Direct IP"},        //
604
605/* Sony Ericsson */
606        {0x0fce, 0xd0cf, "option", 0, 1, 0 | ACM, &select_config3, "Sony Ericsson MD300"},      //
607        {0x0fce, 0xd0df, "option", 0, 1, 0 | ACM, &select_config2, "Sony Ericsson EC400"},      //
608        {0x0fce, 0xd0e1, "option", 0, 1, 0 | ACM, &select_config2, "Sony Ericsson MD400"},      //
609        {0x0fce, 0xd0ee, "option", 0, 1, 0 | ACM, NULL, "Sony Ericsson EC400G"},        //
610        {0x0fce, 0xd103, "option", 0, 1, 0 | ACM, NULL, "Sony Ericsson MD400G"},        //
611
612/* LG Electronics */
613        {0x1004, 0x6107, "option", 0, 0, 0 | ACM, NULL, "LG-LDU1900D"}, //
614        {0x1004, 0x6109, "option", 0, 0, 0 | ACM, NULL, "LG-L02A"},     //
615        {0x1004, 0x610c, "option", 0, 0, 0, &modeswitch_std_eject, "LG L-02A"}, //
616        {0x1004, 0x6124, "option", 0, 0, 0 | ACM, NULL, "LG L-05A"},    //
617//      {0x1004, 0x6135, "option", 0, 2, 0, NULL, "LG L-07A"},      //
618        {0x1004, 0x613a, "option", 0, 0, 0, &modeswitch_std_eject, "LG L-05A"}, //
619        {0x1004, 0x613f, "option", 0, 0, 0, &modeswitch_std_eject, "LG LUU-2100TI"},    //
620        {0x1004, 0x6141, "option", 0, 0, 0 | ACM, NULL, "LG LUU-2100TI"},       //
621        {0x1004, 0x614e, "option", 0, 0, 0, &modeswitch_std_eject, "LG L-07A"}, //
622        {0x1004, 0x6156, "option", 0, 0, 0, &modeswitch_std_eject, "LG LUU-2110TI"},    //
623        {0x1004, 0x6157, "option", 0, 2, 0 | ACM, NULL, "LG LUU-2110TI"},       //
624        {0x1004, 0x618f, "option", 0, 2, 0, NULL, "LG L-02C"},  //
625        {0x1004, 0x6190, "option", 0, 0, 0, &modeswitch_std_eject, "LG AD600"}, //
626//      {0x1004, 0x61a7, "option", 0, 2, 0, NULL, "LG AD600"},      // also cdc_ether
627        {0x1004, 0x61dd, "option", 0, 0, 0, &modeswitch_std_eject, "LG L-02C"}, //
628//      {0x1004, 0x61e6, "option", 0, 2, 0, NULL, "LG SD711"},      //
629        {0x1004, 0x61e7, "option", 0, 0, 0, &modeswitch_std_eject, "LG SD711"}, //
630//      {0x1004, 0x61ea, "option", 0, 2, 0, NULL, "LG L-08C"},      //
631        {0x1004, 0x61eb, "option", 0, 0, 0, &modeswitch_std_eject, "LG L-08C"}, //
632//      {0x1004, 0x6326, "option", 0, 2, 0, NULL, "LG L-03D"},      //
633//      {0x1004, 0x6327, "option", 0, 0, 0, &modeswitch_std_eject, "LG L-03D"},     //
634
635/* Nucam */
636        {0x1033, 0x0035, "option", 0, 0, 2, &modeswitch_huawei_old, "HUAWEI E630"},     //
637
638/* Curitel */
639        {0x106c, 0x3711, "option", 0, 0, 2 | ACM, NULL, "PANTECH UM-150"},      //
640        {0x106c, 0x3712, "option", 0, 0, 2 | ACM, NULL, "PANTECH UM-175V1"},    //
641        {0x106c, 0x3714, "option", 0, 0, 2 | ACM, NULL, "PANTECH UM-175VW"},    //
642        {0x106c, 0x3715, "option", 0, 0, 2 | ACM, NULL, "PANTECH UM-175AL"},    //
643        {0x106c, 0x3716, "option", 0, 0, 2 | ACM, NULL, "PANTECH UM-190VW"},    //
644        {0x106c, 0x3717, "option", 0, 0, 2 | ACM, NULL, "PANTECH UM-185C/UM185E"},      //
645        {0x106c, 0x3718, "option", 0, 0, 2 | ACM, NULL, "PANTECH UML-290VW 4G Modem"},  // also qmi but fails in dd-wrt
646        {0x106c, 0x3721, "option", 0, 0, 2 | QMI, NULL, "PANTECH P4200 4G Modem"},      //
647        {0x106c, 0x3b03, "option", 0, 0, 2, &modeswitch_curitel, "PANTECH UM-175AL"},   //
648        {0x106c, 0x3b05, "option", 0, 0, 2, &modeswitch_curitel, "PANTECH UM-190"},     //
649        {0x106c, 0x3b06, "option", 0, 0, 2, &modeswitch_curitel, "PANTECH UM-185C/UM185E"},     //
650        {0x106c, 0x3b11, "option", 0, 0, 2, &modeswitch_curitel, "PANTECH UML-290"},    //
651        {0x106c, 0x3b14, "option", 0, 0, 2, &modeswitch_curitel, "PANTECH P4200"},      //
652
653/* SK Teletech */
654//      {0x10a9, 0x6064, "option", 0, 0, 2 | ETH, NULL, "PANTECH UML-295"}, //
655        {0x10a9, 0x606f, "option", 0, 0, 2, &modeswitch_others, "PANTECH ULM-295 (cdrom)"},     //
656        {0x10a9, 0x6080, "option", 0, 0, 2, &modeswitch_others, "PANTECH MHS291LVW (cdrom)"},   //
657//      {0x10a9, 0x6085, "option", 0, 0, 2 | ETH, NULL, "PANTECH MHS291LVW"},       //
658
659/* Sierra Wireless-Wavecom */
660        {0x114f, 0x68a2, "qcserial", 2, 0, 1 | QMI, NULL, "Sierra MC7750 (modem)"},     //
661
662/* Sierra Wireless (Netgear) */
663        {0x1199, 0x0017, "sierra", 3, 4, 1, NULL, "Sierra EM5625 (modem)"},     //
664        {0x1199, 0x0018, "sierra", 3, 4, 1, NULL, "Sierra MC5720 (modem)"},     //
665        {0x1199, 0x0019, "sierra", 3, 4, 1, NULL, "Sierra AC595U (modem)"},     //
666        {0x1199, 0x0020, "sierra", 3, 4, 1, NULL, "Sierra MC5725 (modem)"},     //
667        {0x1199, 0x0021, "sierra", 3, 4, 1, NULL, "Sierra AC597E (modem)"},     //
668        {0x1199, 0x0022, "sierra", 3, 4, 1, NULL, "Sierra EM5725 (modem)"},     //
669        {0x1199, 0x0023, "sierra", 3, 4, 1, NULL, "Sierra C597 (modem)"},       //
670        {0x1199, 0x0024, "sierra", 3, 4, 1, NULL, "Sierra MC5727 (modem)"},     //
671        {0x1199, 0x0025, "sierra", 3, 4, 1, NULL, "Sierra AC598 (modem)"},      //
672        {0x1199, 0x0026, "sierra", 3, 4, 1, NULL, "Sierra T11 (modem)"},        //
673        {0x1199, 0x0027, "sierra", 3, 4, 1, NULL, "Sierra AC402 (modem)"},      //
674        {0x1199, 0x0028, "sierra", 3, 4, 1, NULL, "Sierra MC5728 (modem)"},     //
675        {0x1199, 0x0112, "sierra", 3, 4, 1, NULL, "Sierra AC580 (modem)"},      //
676        {0x1199, 0x0120, "sierra", 3, 4, 1, NULL, "Sierra AC595U (modem)"},     //
677        {0x1199, 0x0218, "sierra", 3, 4, 1, NULL, "Sierra MC5720 (modem)"},     //
678        {0x1199, 0x0220, "sierra", 3, 4, 1, NULL, "Sierra MC5725 (modem)"},     //
679        {0x1199, 0x0224, "sierra", 3, 4, 1, NULL, "Sierra MC5727 (modem)"},     //
680        {0x1199, 0x0301, "sierra", 3, 4, 1, NULL, "Sierra AC250U (modem)"},     //
681        {0x1199, 0x0fff, NULL, NODEV, NODEV, 1, &modeswitch_sierra, "Sierra Device (cdrom)"},   //
682        {0x1199, 0x6802, "sierra", 0, 2, 1, NULL, "Sierra MC8755 (modem)"},     //
683        {0x1199, 0x6803, "sierra", 0, 2, 1, NULL, "Sierra MC8765 (modem)"},     //
684        {0x1199, 0x6804, "sierra", 0, 2, 1, NULL, "Sierra MC8755 (modem)"},     //
685        {0x1199, 0x6805, "sierra", 0, 2, 1, NULL, "Sierra MC8765 (modem)"},     //
686        {0x1199, 0x6808, "sierra", 0, 2, 1, NULL, "Sierra MC8755 (modem)"},     //
687        {0x1199, 0x6809, "sierra", 0, 2, 1, NULL, "Sierra MC8765 (modem)"},     //
688        {0x1199, 0x6812, "sierra", 0, 2, 1, &reset_mc, "Sierra MC8775V"},       //
689        {0x1199, 0x6813, "sierra", 0, 2, 1, NULL, "Sierra MC8775 (modem)"},     //
690        {0x1199, 0x6815, "sierra", 0, 2, 1, NULL, "Sierra MC8775 (modem)"},     //
691        {0x1199, 0x6816, "sierra", 0, 2, 1, NULL, "Sierra MC8775 (modem)"},     //
692        {0x1199, 0x6820, "sierra", 0, 2, 1, NULL, "Sierra AC875 (modem)"},      //
693        {0x1199, 0x6821, "sierra", 2, 0, 1, NULL, "Sierra AC875U (modem)"},     //
694        {0x1199, 0x6822, "sierra", 3, 4, 1, NULL, "Sierra AC875E (modem)"},     //
695        {0x1199, 0x6832, "sierra", 2, 0, 1, &reset_mc, "Sierra MC8780 (modem)"},        //
696        {0x1199, 0x6833, "sierra", 3, 4, 1, NULL, "Sierra MC8781 (modem)"},     //
697        {0x1199, 0x6834, "sierra", 3, 4, 1, NULL, "Sierra MC8780 (modem)"},     //
698        {0x1199, 0x6835, "sierra", 3, 4, 1, NULL, "Sierra MC8781 (modem)"},     //
699        {0x1199, 0x6838, "sierra", 3, 4, 1, NULL, "Sierra MC8780 (modem)"},     //
700        {0x1199, 0x6839, "sierra", 3, 4, 1, NULL, "Sierra MC8781 (modem)"},     //
701        {0x1199, 0x683a, "sierra", 3, 4, 1, NULL, "Sierra MC8785 (modem)"},     //
702        {0x1199, 0x683b, "sierra", 3, 4, 1, NULL, "Sierra MC8785 Composite (modem)"},   //
703        {0x1199, 0x683c, "sierra", 3, 3, 1, &reset_mc, "Sierra MC8790 Composite"},      //
704        {0x1199, 0x683d, "sierra", 3, 3, 1, &reset_mc, "Sierra MC8791 Composite"},      //
705        {0x1199, 0x683e, "sierra", 3, 3, 1, &reset_mc, "Sierra MC8790"},        //
706        {0x1199, 0x6850, "sierra", 2, 0, 1, NULL, "Sierra AC880 (modem)"},      //
707        {0x1199, 0x6851, "sierra", 2, 0, 1, NULL, "Sierra AC 881 (modem)"},     //
708        {0x1199, 0x6852, "sierra", 2, 0, 1, NULL, "Sierra AC880E (modem)"},     //
709        {0x1199, 0x6853, "sierra", 2, 0, 1, NULL, "Sierra AC881E (modem)"},     //
710        {0x1199, 0x6855, "sierra", 2, 0, 1, NULL, "Sierra AC880U (modem)"},     //
711        {0x1199, 0x6856, "sierra", 2, 0, 1, NULL, "Sierra AT&T USB Connect 881 (modem)"},       //
712        {0x1199, 0x6859, "sierra", 2, 0, 1, NULL, "Sierra AC885E (modem)"},     //
713        {0x1199, 0x685a, "sierra", 2, 0, 1, NULL, "Sierra AC885E (modem)"},     //
714        {0x1199, 0x6880, "sierra", 3, 3, 1, NULL, "Sierra C885"},       //
715        {0x1199, 0x6890, "sierra", 3, 3, 1, NULL, "Sierra C888"},       //
716        {0x1199, 0x6891, "sierra", 3, 3, 1, NULL, "Sierra C22/C33"},    //
717        {0x1199, 0x6892, "sierra", 3, 3, 1, NULL, "Sierra Compass HSPA"},       //
718        {0x1199, 0x6893, "sierra", 3, 3, 1, NULL, "Sierra C889"},       //
719        {0x1199, 0x68a2, "qcserial", 2, 0, 1 | QMI, NULL, "Sierra MC7710 (modem)"},     // also cdc_mbim
720        {0x1199, 0x68a3, "sierra", 3, 4, 1, &reset_mc, "Sierra MC8700/Compass Direct IP"},      // also sierra_net
721        {0x1199, 0x68a5, "qcserial", 2, 0, 1 | QMI, NULL, "Sierra MC8705 (modem)"},     //
722        {0x1199, 0x68a9, "qcserial", 2, 0, 1 | QMI, &select_config1, "Sierra MC7750"},  // cdc_mbim in default config2
723        {0x1199, 0x68aa, "sierra", 3, 3, 1, NULL, "Sierra AC320U/AC330U Direct IP"},    // also sierra_net
724        {0x1199, 0x68c0, "qcserial", 2, 0, 1 | QMI, NULL, "Sierra MC7304/7354"},        //
725        {0x1199, 0x9011, "qcserial", 2, 0, 1 | QMI, &select_config1, "Sierra MC8305 (modem)"},  // cdc_mbim in default config2
726        {0x1199, 0x9013, "qcserial", 2, 0, 1 | QMI, &select_config1, "Sierra MC8355 (modem)"},  // cdc_mbim in default config2
727        {0x1199, 0x901b, "qcserial", 2, 0, 1 | QMI, &select_config1, "Sierra MC7770"},  // cdc_mbim in default config2
728        {0x1199, 0x901c, "qcserial", 2, 0, 1 | QMI, &select_config1, "Sierra EM7700"},  // cdc_mbim in default config2
729        {0x1199, 0x901f, "qcserial", 2, 0, 1 | QMI, &select_config1, "Sierra EM7355"},  // cdc_mbim in default config2
730        {0x1199, 0x9041, "qcserial", 2, 0, 1 | QMI, &select_config1, "Sierra EM8805"},  // cdc_mbim in default config2
731        {0x1199, 0x9051, "qcserial", 2, 0, 1 | QMI, &select_config1, "Netgear AC340U (modem)"}, // cdc_mbim in default config2
732        {0x1199, 0x9055, "qcserial", 2, 0, 1 | QMI, &select_config1, "Netgear AC341U (modem)"}, //
733        {0x1199, 0x9057, "qcserial", 2, 0, 1 | QMI, &select_config1, "Netgear AC341U (modem)"}, //
734        {0x1199, 0x9063, "qcserial", 2, 0, 1 | QMI, &select_config1, "Sierra EM7305"},  // cdc_mbim in default config2
735        {0x1199, 0x9071, "qcserial", 2, 0, 1 | QMIRAW, &select_config1, "Sierra MC7430 (modem)"},       // cdc_mbim in default config2
736
737/* Pirelli Broadband Solutions */
738        {0x1266, 0x1000, "option", 0, 0, 0, &modeswitch_std_eject, "Pirelli"},  //
739        {0x1266, 0x1009, "option", 2, 0, 2, NULL, "Digicom 8E4455 (modem)"},    //
740
741/* Huawei Technologies */
742        {0x12d1, 0x1001, "option", 2, 0, 2, &modeswitch_huawei_old, "HUAWEI E600/E620"},        //
743        {0x12d1, 0x1003, "option", 1, 0, 2, &modeswitch_huawei_old, "HUAWEI E172/EC27/E220/E230/E270"}, //
744        {0x12d1, 0x1004, "option", 1, 0, 2, &modeswitch_huawei_old, "HUAWEI E220BIS/K3520"},    //
745        {0x12d1, 0x1009, "option", 0, 0, 2, &modeswitch_huawei_old, "HUAWEI U120"},     //
746        {0x12d1, 0x1010, "option", 0, 0, 2, &modeswitch_huawei_old, "HUAWEI ETS1201"},  //
747        {0x12d1, 0x101e, "option", 0, 0, 2, &modeswitch_rezero, "HUAWEI U7510/U7517"},  //
748        {0x12d1, 0x1030, "option", 0, 0, 2, &modeswitch_huawei_std, "HUAWEI U8220 (Android smartphone)"},       //
749        {0x12d1, 0x1031, "option", 0, 0, 2, &modeswitch_huawei_std, "HUAWEI U8110 (Android smartphone)"},       //
750        {0x12d1, 0x1034, "option", 0, 0, 2, NULL, "HUAWEI U8220 (Android smartphone)"}, //
751        {0x12d1, 0x1035, "option", 0, 0, 2, NULL, "HUAWEI U8110 (Android smartphone)"}, //
752//      {0x12d1, 0x1400, NULL, NODEV, NODEV, 0 | ETH, NULL,  "Huawei K4305 composite"},   // most likely qmi but not yet in driver
753        {0x12d1, 0x1404, "option", 2, 0, 2 | QMI, NULL, "HUAWEI UMG1831"},      //
754        {0x12d1, 0x1406, "option", 1, 0, 2, NULL, "HUAWEI newer modems"},       //
755        {0x12d1, 0x140b, "option", 2, 0, 2, NULL, "HUAWEI EC1260"},     //
756        {0x12d1, 0x140c, "option", 3, 0, 2 | QMI, NULL, "HUAWEI newer modems"}, //
757        {0x12d1, 0x1411, "option", 2, 0, 2, &modeswitch_huawei_old, "HUAWEI E510/EC121"},       //
758        {0x12d1, 0x1412, "option", 2, 0, 2, NULL, "HUAWEI EC168"},      //
759        {0x12d1, 0x1413, "option", 2, 0, 2, &modeswitch_huawei_old, "HUAWEI EC168"},    //
760        {0x12d1, 0x1414, "option", 2, 0, 2, &modeswitch_huawei_old, "HUAWEI E180"},     //
761        {0x12d1, 0x1417, "option", 2, 0, 2, NULL, "HUAWEI E1756"},      //
762        {0x12d1, 0x141b, "option", 1, 0, 2, NULL, "HUAWEI newer modems"},       //
763        {0x12d1, 0x1429, "option", 2, 0, 2, NULL, "HUAWEI/EMobile D31HW"},      // also qmi but not yet in driver
764//      {0x12d1, 0x1432, "option", 0, 0, 2 | QMI, NULL, "HUAWEI E585"},     // ecm attributes but probably qmi
765        {0x12d1, 0x1433, "option", 2, 0, 2, NULL, "HUAWEI E1756C"},     // also qmi but not yet in driver
766        {0x12d1, 0x1436, "option", 2, 0, 2, NULL, "HUAWEI E1800"},      // ecm attributes but probably qmi
767        {0x12d1, 0x1444, "option", 0, 0, 2, NULL, "HUAWEI E352-R1"},    //
768        {0x12d1, 0x1446, "option", 0, 0, 2, &modeswitch_huawei_std, "HUAWEI E1552/E1800"},      //
769        {0x12d1, 0x1449, "option", 0, 0, 2, &modeswitch_huawei_std, "HUAWEI E352-R1"},  //
770        {0x12d1, 0x144e, "option", 0, 2, 2, NULL, "Huawei K3806"},      //
771        {0x12d1, 0x1464, "option", 2, 0, 2, NULL, "Huawei K4505"},      // also qmi but not yet in driver
772        {0x12d1, 0x1465, "option", 2, 0, 2, NULL, "Huawei K3765"},      // ecm attributes but probably qmi
773//      {0x12d1, 0x1491, "option", 0, 0, 2 | QMI, NULL, "Vodafone R201"},   // qmi only but not yet in driver
774        {0x12d1, 0x14a5, "option", 2, 0, 2, NULL, "Huawei E173"},       //
775        {0x12d1, 0x14a8, "option", 2, 0, 2, NULL, "Huawei E173"},       //
776        {0x12d1, 0x14aa, "option", 2, 0, 2, NULL, "Huawei E1750"},      //
777        {0x12d1, 0x14ac, "option", 2, 0, 2 | QMI, NULL, "HUAWEI newer modems"}, //
778        {0x12d1, 0x14ad, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K3806"},    //
779        {0x12d1, 0x14ae, "option", 1, 2, 2, NULL, "Huawei K3806"},      // also cdc_ether
780        {0x12d1, 0x14b5, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E173"},     //
781        {0x12d1, 0x14b7, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K4511"},    //
782        {0x12d1, 0x14ba, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E173/E177 (cdrom)"},        //
783//      {0x12d1, 0x14bc, NULL, NODEV, NODEV, 0 | ETH, NULL,  "Huawei K3773 (net)"},       //
784        {0x12d1, 0x14c1, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K4605"},    //
785        {0x12d1, 0x14c3, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K5005"},    //
786        {0x12d1, 0x14c4, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K3771"},    //
787        {0x12d1, 0x14c5, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K4510"},    //
788        {0x12d1, 0x14c6, "option", 2, 0, 2 | QMI, NULL, "Huawei K4605"},        //
789        {0x12d1, 0x14c8, "option", 2, 0, 2 | QMI, NULL, "Huawei K5005"},        //
790        {0x12d1, 0x14c9, "option", 2, 0, 2, NULL, "Huawei K3770"},      //
791        {0x12d1, 0x14ca, "option", 2, 0, 2 | QMI, NULL, "Huawei K3771"},        //
792        {0x12d1, 0x14cb, "option", 2, 0, 2, NULL, "Huawei K4510"},      //
793        {0x12d1, 0x14cc, "option", 2, 0, 2 | QMI, NULL, "Huawei K4511"},        //
794//      {0x12d1, 0x14cd, "option", 2, 0, 2 | H_NCM, NULL, "Vodafone R205"}, // cdc_ncm only
795        {0x12d1, 0x14cf, "option", 2, 0, 2, NULL, "Huawei K3772 (modem)"},      // cdc_ncm able
796        {0x12d1, 0x14d1, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E182E"},    //
797        {0x12d1, 0x14d2, "option", 2, 0, 2 | QMI, NULL, "Huawei E173/E177 (modem)"},    //
798//      {0x12d1, 0x14db, NULL, NODEV, NODEV, 0 | ETH, NULL,  "Huawei E353"},      //
799//      {0x12d1, 0x14dc, NULL, NODEV, NODEV, 0 | ETH, NULL,  "Huawei E303"},      //
800        {0x12d1, 0x14fe, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E352,E353"},        //
801        {0x12d1, 0x1505, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E398"},     //
802        {0x12d1, 0x1506, "option", 2, 0, 2, NULL, "Huawei E367/E398 (modem)"},  // can not be QMI flagged!
803        {0x12d1, 0x150a, "option", 2, 0, 2 | QMI, NULL, "Huawei E398 (modem)"}, //
804        {0x12d1, 0x150c, "option", 1, 2, 2 | QMI, NULL, "Huawei E367"}, //
805        {0x12d1, 0x150f, "option", 0, 0, 2 | QMI, NULL, "Huawei E367"}, //
806        {0x12d1, 0x151a, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E392u-12"}, //
807        {0x12d1, 0x151b, "option", 0, 0, 2 | QMI, NULL, "Huawei E392u-12"},     //
808        {0x12d1, 0x151d, "option", 3, 0, 2, NULL, "Huawei E3131 (modem)"},      // ncm & mbim able
809        {0x12d1, 0x1520, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K3765"},    //
810        {0x12d1, 0x1521, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K4505"},    //
811        {0x12d1, 0x1523, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei R201"},     //
812        {0x12d1, 0x1526, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K3772 (cdrom)"},    //
813        {0x12d1, 0x1527, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei R206"},     //
814        {0x12d1, 0x1553, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E1553"},    //
815        {0x12d1, 0x1557, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E173"},     //
816        {0x12d1, 0x155a, "option", 0, 0, 2, &modeswitch_huawei_std, "Vodafone R205"},   //
817        {0x12d1, 0x155b, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E171/E320"},        //
818        {0x12d1, 0x156a, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E3251/E3276"},      //
819        {0x12d1, 0x156c, "option", 1, 0, 2, NULL, "Huawei E3276 (modem)"},      // also cdc_ncm
820        {0x12d1, 0x1570, "option", 1, 0, 2, NULL, "Huawei ME906E (modem)"},     // also cdc_mbim
821        {0x12d1, 0x1571, "option", 1, 0, 2, NULL, "Huawei EM820W (modem)"},     // also cdc_mbim
822//      {0x12d1, 0x1575, NULL, NODEV, NODEV, 2 | ETH, NULL,  "Huawei K5150 composite"},   //
823//      {0x12d1, 0x1576, NULL, NODEV, NODEV, 2 | ETH, NULL,  "Huawei K4201 composite"},   //
824//      {0x12d1, 0x1577, NULL, NODEV, NODEV, 2 | ETH, NULL,  "Huawei K4202 composite"},   //
825//      {0x12d1, 0x1578, NULL, NODEV, NODEV, 2 | ETH, NULL,  "Huawei K4606 composite"},   //
826        {0x12d1, 0x157c, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E3276s-150"},       // also cdc_mbim
827        {0x12d1, 0x157d, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E3331"},    // also cdc_mbim
828        {0x12d1, 0x1581, "option", 0, 0, 2, &modeswitch_huawei_std, "Vodafone R208"},   //
829        {0x12d1, 0x1582, "option", 0, 0, 2, &modeswitch_huawei_std, "Vodafone R215"},   //
830        {0x12d1, 0x1583, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E8278"},    //
831//      {0x12d1, 0x1588, "option", 0, 0, 2 | NCM, NULL, "Vodafone R215 (net)"},     //
832//      {0x12d1, 0x1589, "option", 0, 0, 2 | NCM, NULL, "Huawei E8278 (net)"},      //
833//      {0x12d1, 0x1590, NULL, NODEV, NODEV, 2 | ETH, NULL, "Huawei K4203 composite"},    //
834        {0x12d1, 0x15b1, "option", 1, 0, 2, NULL, "Huawei E3531s-2 (modem)"},   // also ncm
835        {0x12d1, 0x15ca, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E3131"},    //
836        {0x12d1, 0x15cd, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E3372"},    //
837        {0x12d1, 0x15ce, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E3531s-2"}, //
838        {0x12d1, 0x15e7, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E3531"},    //
839        {0x12d1, 0x1805, "option", 1, 0, 2, &modeswitch_rezero, "Huawei U2800A/U6150 (modem)"}, //
840        {0x12d1, 0x1c05, "option", 2, 0, 2, NULL, "Huawei E173s (modem)"},      //
841        {0x12d1, 0x1c07, "option", 2, 0, 2, NULL, "Huawei E188 (modem)"},       // also cdc_ncm
842        {0x12d1, 0x1c08, "option", 1, 0, 2, NULL, "Huawei E173s (modem)"},      //
843        {0x12d1, 0x1c0b, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E173s (cdrom)"},    //
844        {0x12d1, 0x1c10, "option", 2, 0, 2, NULL, "Huawei E173 (modem)"},       //
845        {0x12d1, 0x1c12, "option", 2, 0, 2, NULL, "Huawei E173 (modem)"},       //
846        {0x12d1, 0x1c1b, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E398 (cdrom)"},     //
847//      {0x12d1, 0x1c1e, "option", 1, 0, 2 | NCM, NULL, "Huawei E586 (net)"},       //
848//      {0x12d1, 0x1c1f, "option", 0, 0, 2 | NCM, NULL, "Huawei E587 (net)"},       //
849        {0x12d1, 0x1c20, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E5220s-2 (cdrom)"}, //
850        {0x12d1, 0x1c23, "option", 0, 2, 2, NULL, "Huawei E173 (modem)"},       //
851        {0x12d1, 0x1c24, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E173 (cdrom)"},     //
852        {0x12d1, 0x1d09, "option", 0, 0, 2 | ACM, NULL, "Huawei ET8282 (modem)"},       //
853        {0x12d1, 0x1da1, "option", 2, 0, 2, &modeswitch_huawei_old, "Huawei ET8282 (cdrom)"},   //
854        {0x12d1, 0x1f01, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E303/E353 (cdrom)"},        //
855        {0x12d1, 0x1f02, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E5773 (cdrom)"},    //
856        {0x12d1, 0x1f03, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei E353 (cdrom)"},     //
857        {0x12d1, 0x1f04, "option", 0, 0, 2, &modeswitch_huawei_std, "Vodafone R206_MR (cdrom)"},        //
858        {0x12d1, 0x1f05, "option", 0, 0, 2, &modeswitch_huawei_std, "Vodafone R207 (cdrom)"},   //
859        {0x12d1, 0x1f06, "option", 0, 0, 2, &modeswitch_huawei_std, "Vodafone R215_MR (cdrom)"},        //     
860        {0x12d1, 0x1f07, "option", 0, 0, 2, &modeswitch_huawei_std, "Vodafone R226 (cdrom)"},   //
861        {0x12d1, 0x1f09, "option", 0, 0, 2, &modeswitch_huawei_std, "Vodafone R216 (cdrom)"},   //
862        {0x12d1, 0x1f0e, "option", 0, 0, 2, &modeswitch_huawei_std, "KDDI U01 (cdrom)"},        //
863        {0x12d1, 0x1f11, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K3773 (cdrom)"},    //
864        {0x12d1, 0x1f15, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K4305 (cdrom)"},    // also cdc_mbim
865        {0x12d1, 0x1f16, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K5150 (cdrom)"},    // also cdc_mbim
866        {0x12d1, 0x1f17, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K4201 (cdrom)"},    // also cdc_mbim
867        {0x12d1, 0x1f18, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K4202 (cdrom)"},    // also cdc_mbim
868        {0x12d1, 0x1f19, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K4606 (cdrom)"},    // also cdc_mbim
869        {0x12d1, 0x1f1b, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei Kxxxx (cdrom)"},    // also cdc_mbim
870        {0x12d1, 0x1f1c, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K4203 (cdrom)"},    // also cdc_mbim
871        {0x12d1, 0x1f1d, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei Kxxxx (cdrom)"},    // also cdc_mbim
872        {0x12d1, 0x1f1e, "option", 0, 0, 2, &modeswitch_huawei_std, "Huawei K5160 (cdrom)"},    // also cdc_mbim
873
874/* Novatel Wireless */
875        {0x1410, 0x1400, "option", 1, 0, 2, NULL, "Novatel U730 (modem)"},      //
876        {0x1410, 0x1410, "option", 1, 0, 2, NULL, "Novatel U740 (modem)"},      //
877        {0x1410, 0x1420, "option", 1, 0, 2, NULL, "Novatel U870 (modem)"},      //
878        {0x1410, 0x1430, "option", 1, 0, 2, NULL, "Novatel XU870 (modem)"},     //
879        {0x1410, 0x1450, "option", 1, 0, 2, NULL, "Novatel X950D (modem)"},     //
880        {0x1410, 0x2100, "option", 1, 0, 2, NULL, "Novatel EV620 (modem)"},     //
881        {0x1410, 0x2110, "option", 1, 0, 2, NULL, "Novatel ES720 (modem)"},     //
882        {0x1410, 0x2120, "option", 1, 0, 2, NULL, "Novatel E725 (modem)"},      //
883        {0x1410, 0x2130, "option", 1, 0, 2, NULL, "Novatel ES620 (modem)"},     //
884        {0x1410, 0x2400, "option", 1, 0, 2, NULL, "Novatel EU730 (modem)"},     //
885        {0x1410, 0x2410, "option", 1, 0, 2, NULL, "Novatel EU740 (modem)"},     //
886        {0x1410, 0x2420, "option", 1, 0, 2, NULL, "Novatel EU870D (modem)"},    //
887        {0x1410, 0x4100, "option", 1, 0, 2, NULL, "Novatel MC727/U727 (modem)"},        //
888        {0x1410, 0x4400, "option", 1, 0, 2, NULL, "Novatel Ovation MC930D/MC950D (modem)"},     //
889        {0x1410, 0x5010, "option", 0, 0, 2, &modeswitch_std_eject, "Novatel X950D(cdrom)"},     //
890        {0x1410, 0x5020, "option", 0, 0, 2, &modeswitch_std_eject, "Novatel MC990D (cdrom)"},   //
891        {0x1410, 0x5023, "option", 0, 0, 2, &modeswitch_std_eject, "Novatel MC996D (cdrom)"},   //
892        {0x1410, 0x5030, "option", 0, 0, 2, &modeswitch_std_eject, "Novatel U760 (cdrom)"},     //
893        {0x1410, 0x5031, "option", 0, 0, 2, &modeswitch_std_eject, "Novatel MC760 (cdrom)"},    //
894        {0x1410, 0x5041, "option", 0, 0, 2, &modeswitch_std_eject, "Novatel MiFi 2372 (cdrom)"},        //
895        {0x1410, 0x5054, "option", 0, 0, 2, &modeswitch_std_eject, "Novatel MiFi 4082 (cdrom)"},        //
896        {0x1410, 0x5055, "option", 0, 0, 2, &modeswitch_std_eject, "Novatel MiFi 4082 (cdrom)"},        //
897        {0x1410, 0x5059, "option", 0, 0, 2, &modeswitch_std_eject, "Novatel MC545/U679 (cdrom)"},       //
898        {0x1410, 0x5076, "option", 0, 0, 2, &modeswitch_std_eject, "Novatel MiFi 4620 (cdrom)"},        //
899        {0x1410, 0x5077, "option", 0, 0, 2, &modeswitch_std_eject, "Novatel MiFi 4620 (cdrom)"},        //
900        {0x1410, 0x6000, "option", 1, 0, 2, NULL, "Novatel U760 (modem)"},      //
901        {0x1410, 0x6001, "option", 1, 0, 2, NULL, "Novatel U760 (modem)"},      //
902        {0x1410, 0x6002, "option", 1, 0, 2, NULL, "Novatel U760 3G (modem)"},   //
903        {0x1410, 0x6010, "option", 1, 0, 2, NULL, "Novatel MC780 (modem)"},     //
904        {0x1410, 0x7001, "option", 1, 0, 2, NULL, "Novatel MiFi 2372 (modem)"}, //
905        {0x1410, 0x7003, "option", 1, 0, 2, NULL, "Novatel MiFi 2372 (modem)"}, //
906        {0x1410, 0x7030, "option", 0, 0, 2, NULL, "Novatel USB998 (modem)"},    // also cdc_ether
907        {0x1410, 0x7031, "option", 0, 0, 2 | GENERIC, NULL, "Novatel U679 (modem)"},    // also cdc_ether
908        {0x1410, 0x7041, "option", 0, 0, 2, NULL, "Novatel MF3470 (modem)"},    //
909        {0x1410, 0x7042, "option", 0, 0, 2, NULL, "Novatel Ovation MC545/MC547 (modem)"},       //
910        {0x1410, 0x9010, "option", 1, 0, 2 | QMI, NULL, "Novatel E362 (modem)"},        //
911        {0x1410, 0x9011, "option", 1, 0, 2 | QMI, NULL, "Novatel E371 (modem)"},        //
912        {0x1410, 0xa001, "qcserial", 1, 0, 2 | QMI, NULL, "Novatel USB1000 (modem)"},   //
913        {0x1410, 0xa021, "qcserial", 1, 0, 2 | QMI, NULL, "Novatel E396 (modem)"},      //
914        {0x1410, 0xb001, "option", 1, 0, 2 | QMI, NULL, "Novatel MC551/USB551L (modem)"},       //
915//      {0x1410, 0xb003, "option", 1, 0, 2 | QMI, NULL, "Novatel MiFi 4510"},       //
916        {0x1410, 0xb005, "option", 1, 0, 2, NULL, "Novatel MiFi 4620L/4620LE"}, // also cdc_ether(qmi?) and rndis
917        {0x1410, 0xb009, NULL, NODEV, NODEV, 2, &select_config2, "Novatel MiFi 5792"},  // rndis in config1, cdc_ether(qmi?) in config2
918        {0x1410, 0xb00a, "option", 1, 0, 2, NULL, "Novatel MiFi 5510"}, // also cdc_ether(qmi?) and rndis
919        {0x1410, 0xb00b, NULL, NODEV, NODEV, 2, &select_config2, "Novatel MiFi 5510L"}, // rndis in config1, cdc_ether(qmi?) in config2
920        {0x1410, 0xb00c, NULL, NODEV, NODEV, 2, &select_config2, "Novatel MiFi 6620L"}, // rndis in config1, cdc_ether(qmi?) in config2
921
922/* UBIQUAM */
923        {0x1529, 0x3100, "option", 0, 0, 2 | ACM, NULL, "UBIQUAM U-100/105/200/300/520"},       //
924
925/* VIA Telecom */
926        {0x15eb, 0x0001, "option", 1, 0, 2 | GENERIC, NULL, "Ublox FW2760/2770"},       //
927        {0x15eb, 0x1231, "option", 0, 0, 2 | ACM, NULL, "Prithvi UE100"},       //
928        {0x15eb, 0x7152, "option", 3, 0, 2 | GENERIC, NULL, "Tenda 3G189C"},    //
929        {0x15eb, 0x7153, "option", 0, 0, 2, &modeswitch_std_eject, "Tenda 3G189C (cdrom)"},     //
930
931/* Amoi */
932        {0x1614, 0x0800, "option", 1, 0, 2, &modeswitch_rezero, "Amoi H01 (modem)"},    //
933        {0x1614, 0x0802, "option", 1, 0, 2, &modeswitch_rezero, "Amoi H02 (modem)"},    //
934        {0x1614, 0x7002, "option", 1, 0, 2, &modeswitch_rezero, "Amoi H01-A (modem)"},  //
935
936/* AnyDATA */
937        {0x16d5, 0x6202, "option", 2, 0, 2, NULL, "AnyData ADU-620UW"}, //
938        {0x16d5, 0x6501, "option", 1, 0, 2, NULL, "AnyData ADU-300A"},  //
939        {0x16d5, 0x6502, "option", 2, 0, 2, NULL, "AnyData ADU-500A"},  //
940        {0x16d5, 0x6603, "option", 0, 0, 2 | GENERIC, NULL, "AnyData ADU-890WH"},       //
941        {0x16d5, 0x900d, "option", 0, 0, 2 | ACM, NULL, "AnyData ADU-890WH"},   //
942        {0x16d5, 0xf000, "option", 0, 0, 2, &modeswitch_std_eject, "AnyData (cdrom)"},  //
943
944/* CMOTECH */
945        {0x16d8, 0x5141, "option", 0, 0, 0 | ACM, NULL, "Cmotech CNU-510"},     //
946        {0x16d8, 0x5533, "option", 0, 0, 0 | ACM, NULL, "Cmotech CCU-550"},     //
947        {0x16d8, 0x5543, "option", 0, 0, 0 | ACM, NULL, "Cmotech CNU-550"},     //
948        {0x16d8, 0x5553, "option", 0, 0, 0 | ACM, NULL, "Cmotech CDU-550"},     //
949        {0x16d8, 0x6002, "option", 1, 0, 0, NULL, "Franklin U300"},     //
950        {0x16d8, 0x6006, "option", 0, 0, 0, NULL, "Cmotech CGU-628"},   //
951        {0x16d8, 0x6007, "option", 0, 0, 0 | QMI, NULL, "Cmotech CHE-628S"},    //
952        {0x16d8, 0x6008, "option", 2, 1, 0 | QMI, NULL, "Franklin U301"},       //
953        {0x16d8, 0x6280, "option", 2, 1, 0 | QMI, &modeswitch_devchg_ff, "Cmotech CHU-628s"},   //
954        {0x16d8, 0x6281, "option", 0, 0, 0, &modeswitch_devchg_ff, "Cmotech CHU-628s"}, //
955        {0x16d8, 0x6522, "option", 2, 0, 0 | ACM, NULL, "Cmotech CDU-650"},     //
956        {0x16d8, 0x6523, "option", 2, 0, 0 | ACM, NULL, "Cmotech CCU-650U"},    //
957        {0x16d8, 0x6532, "option", 2, 0, 0 | ACM, NULL, "Cmotech CCU-650"},     //
958        {0x16d8, 0x6533, "option", 0, 0, 0 | ACM, NULL, "Cmotech CNM-650"},     //
959        {0x16d8, 0x6543, "option", 0, 0, 0 | ACM, NULL, "Cmotech CNU-650"},     //
960        {0x16d8, 0x6803, "option", 1, 0, 0, &modeswitch_devchg1, "Cmotech CDU-680"},    //
961        {0x16d8, 0x6804, "option", 2, 1, 0, &modeswitch_devchg1, "Cmotech CDU-685A"},   //
962        {0x16d8, 0x680a, "option", 0, 0, 0 | ACM, NULL, "Cmotech CDU-680"},     //
963        {0x16d8, 0x7001, "option", 1, 1, 0 | QMI, &modeswitch_devchg_fe, "Cmotech CHU-720S"},   //
964        {0x16d8, 0x7003, "option", 1, 2, 0 | QMI, &modeswitch_devchg_fe, "Cmotech CHU-629K"},   //
965        {0x16d8, 0x7006, "option", 1, 2, 0 | QMI, &modeswitch_devchg_fe, "Cmotech CGU-629"},    //
966        {0x16d8, 0x700a, "option", 0, 2, 0 | QMI, &modeswitch_devchg_fe, "Cmotech CHU-629S"},   //'
967        {0x16d8, 0x7211, "option", 1, 1, 0 | QMI, &modeswitch_devchg_fe, "Cmotech CHU-720I"},   //
968        {0x16d8, 0xf000, "option", 0, 0, 0, &modeswitch_devchg_ff, "Cmotech CGU-628, 4g_xsstick W12"},  //
969
970/* AxessTel */
971        {0x1726, 0x1000, "option", 0, 0, 2 | GENERIC, NULL, "Axesstel MU130 (modem)"},  //
972        {0x1726, 0x1900, "option", 0, 0, 0, &modeswitch_std_eject, "Axesstel MV140B"},  //
973        {0x1726, 0xa000, "option", 2, 3, 2 | GENERIC, NULL, "Axesstel MU130 (modem)"},  //
974        {0x1726, 0xf00e, "option", 0, 0, 0, &modeswitch_std_eject, "Axesstel MU130"},   //
975
976/* MODMEN */
977        {0x198a, 0x0003, "option", 0, 0, 0, &modeswitch_std_eject, "MODMEN MM450"},     //
978        {0x198a, 0x0002, "option", 2, 0, 2 | GENERIC, NULL, "MODMEN MM450 (modem)"},    //
979
980/* ZTE WCDMA Technologies */
981        {0x19d2, 0x0001, "option", 2, 0, 2, NULL, "ONDA MT505UP/ZTE (modem)"},  //
982        {0x19d2, 0x0002, "option", 2, 0, 2 | QMI, NULL, "ZTE ET502HS/MT505UP/MF632"},   //
983        {0x19d2, 0x0003, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MU351 (cdrom)"},        //
984        {0x19d2, 0x0015, "option", 2, 0, 2, NULL, "ONDA MT505UP/ZTE (modem)"},  //
985        {0x19d2, 0x0016, "option", 1, 2, 2, NULL, "ONDA MF110/ZTE (modem)"},    //
986        {0x19d2, 0x0017, "option", 1, 2, 2 | QMI, NULL, "ONDA MT505UP/ZTE (modem)"},    //
987        {0x19d2, 0x0018, "option", 1, 2, 2, NULL, "ONDA MSA110UP/ZTE (modem)"}, //
988        {0x19d2, 0x0019, "option", 1, 2, 2 | QMI, NULL, "ONDA MT689DC/ZTE (modem)"},    //
989        {0x19d2, 0x0022, "option", 1, 0, 2, NULL, "ZTE K2525 (modem)"}, //
990        {0x19d2, 0x0024, "option", 2, 0, 2, NULL, "ONDA MT503HSA (modem)"},     // also qmi but not yet in driver
991        {0x19d2, 0x0025, "option", 4, 2, 2 | QMI, NULL, "ZTE MF628 (modem)"},   //
992        {0x19d2, 0x0026, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE AC581 (cdrom)"},        //
993        {0x19d2, 0x0031, "option", 1, 2, 2, NULL, "ZTE MF110/MF112/MF626 (Variant) (modem)"},   // don't flag qmi - multiple versions exist
994        {0x19d2, 0x0033, "option", 1, 4, 2, NULL, "ZTE MF636 (modem)"}, //
995        {0x19d2, 0x0034, "option", 0, 1, 2 | ACM, NULL, "ZTE MU330"},   //
996        {0x19d2, 0x0037, "option", 2, 2, 2, NULL, "ONDA MT505UP/ZTE (modem)"},  // also qmi but not yet in driver
997        {0x19d2, 0x0039, "option", 1, 2, 2, NULL, "ZTE MF100 (modem)"}, //
998        {0x19d2, 0x0040, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE K2525 (cdrom)"},        //
999        {0x19d2, 0x0042, "option", 1, 2, 2 | QMI, NULL, "ZTE MF190 (modem)"},   //
1000        {0x19d2, 0x0052, "option", 1, 2, 2 | QMI, NULL, "ONDA MT505UP/ZTE (modem)"},    //
1001        {0x19d2, 0x0053, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF110 (Variant) (modem)"},      //
1002        {0x19d2, 0x0055, "option", 3, 1, 2 | QMI, NULL, "ONDA MT505UP/ZTE (modem)"},    //
1003        {0x19d2, 0x0057, "option", 0, 2, 2, NULL, "AIKO 83D (modem)"},  //
1004        {0x19d2, 0x0063, "option", 1, 3, 2 | QMI, NULL, "ZTE K3565-Z (modem)"}, //
1005        {0x19d2, 0x0064, "option", 0, 2, 2, NULL, "ZTE MF627 (modem)"}, //
1006        {0x19d2, 0x0066, "option", 1, 3, 2, NULL, "ZTE MF626 (modem)"}, //
1007        {0x19d2, 0x0073, "option", 1, 0, 2, NULL, "ZTE A580 (modem)"},  //
1008        {0x19d2, 0x0079, "option", 2, 0, 2, NULL, "ZTE A353 (modem)"},  //
1009        {0x19d2, 0x0082, "option", 1, 2, 2, NULL, "ZTE MF668/MF190 (Variant) (modem)"}, //
1010        {0x19d2, 0x0083, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF110 (Variant) (cdrom)"},      //
1011        {0x19d2, 0x0086, "option", 1, 2, 2, NULL, "ZTE MF645 (modem)"}, //
1012        {0x19d2, 0x0091, "option", 1, 3, 2, NULL, "ZTE MF636 (modem)"}, // also qmi but not yet in driver
1013        {0x19d2, 0x0094, "option", 2, 0, 2, NULL, "ZTE AC581 (modem)"}, //
1014        {0x19d2, 0x0101, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE K4505-Z (cdrom)"},      //
1015        {0x19d2, 0x0103, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF112 (cdrom)"},        //
1016        {0x19d2, 0x0104, "option", 1, 3, 2 | QMI, NULL, "ZTE K4505-Z (modem)"}, //
1017        {0x19d2, 0x0108, "option", 1, 3, 2, NULL, "ONDA MT505UP/ZTE (modem)"},  //
1018        {0x19d2, 0x0110, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF637 (cdrom)"},        //
1019        {0x19d2, 0x0115, "option", 0, 0, 2, &modeswitch_std_eject, "ONDA MT505UP/ZTE (cdrom)"}, //
1020        {0x19d2, 0x0116, "option", 1, 0, 2 | ACM, NULL, "ZTE MF651 (modem)"},   //
1021        {0x19d2, 0x0117, "option", 1, 2, 2, NULL, "ZTE MF112 (modem)"}, //
1022        {0x19d2, 0x0120, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE A353 (cdrom)"}, //
1023        {0x19d2, 0x0121, "option", 1, 3, 2 | QMI, NULL, "ZTE MF637 (modem)"},   //
1024        {0x19d2, 0x0124, "option", 1, 4, 2 | QMI, NULL, "ZTE MF110 (Variant) (modem)"}, //
1025        {0x19d2, 0x0128, "option", 1, 3, 2, NULL, "ZTE MF651 (modem)"}, //
1026        {0x19d2, 0x0142, "option", 0, 0, 2 | ACM, NULL, "ZTE MF665C"},  // also cdc_ether
1027        {0x19d2, 0x0143, "option", 0, 0, 2 | ACM, NULL, "ZTE MF190B"},  // also cdc_ether
1028        {0x19d2, 0x0146, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF652 (cdrom)"},        //
1029        {0x19d2, 0x0149, "option", 0, 0, 2, &modeswitch_zte, "ZTE MF190 (cdrom)"},      //
1030        {0x19d2, 0x0150, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF680 (cdrom)"},        //
1031        {0x19d2, 0x0151, "option", 1, 2, 2, NULL, "Prolink PHS101 (modem)"},    //
1032        {0x19d2, 0x0152, "option", 2, 0, 2, NULL, "ZTE AC583 (modem)"}, //
1033        {0x19d2, 0x0154, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF190S (cdrom)"},       //
1034        {0x19d2, 0x0157, "option", 0, 4, 2 | QMI, NULL, "ZTE MF683 (modem)"},   //
1035        {0x19d2, 0x0166, "option", 0, 0, 2, &modeswitch_others, "ZTE MF821 (Variant) (cdrom)"}, //
1036        {0x19d2, 0x0167, "option", 1, 3, 2 | QMI, NULL, "ZTE MF820D (variant) (modem)"},        //
1037        {0x19d2, 0x0169, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE A371 (cdrom)"}, //
1038        {0x19d2, 0x0170, "option", 0, 1, 2, NULL, "ZTE A371 (variant) (modem)"},        //
1039        {0x19d2, 0x0198, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF820S (cdrom)"},       //
1040        {0x19d2, 0x0199, "option", 1, 2, 2 | QMI, NULL, "ZTE MF820S (modem)"},  //
1041        {0x19d2, 0x0257, "option", 1, 2, 2 | QMI, NULL, "ZTE MF821 (variant) (modem)"}, //
1042        {0x19d2, 0x0265, "option", 2, 3, 2 | QMI, NULL, "Onda MT8205/ZTE (modem)"},     //
1043        {0x19d2, 0x0266, "option", 0, 0, 2, &modeswitch_others, "Onda MT8205/ZTE (cdrom)"},     //
1044        {0x19d2, 0x0284, "option", 1, 3, 2 | QMI, NULL, "ZTE MF880 (modem)"},   //
1045        {0x19d2, 0x0304, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF821D (cdrom)"},       //
1046        {0x19d2, 0x0317, "option", 1, 2, 2, NULL, "ZTE MF826 (modem)"}, // also qmi but not yet in driver
1047        {0x19d2, 0x0318, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF826 (cdrom)"},        //
1048        {0x19d2, 0x0325, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF821D (cdrom)"},       //
1049        {0x19d2, 0x0326, "option", 1, 3, 2 | QMI, NULL, "ZTE MF821D (modem)"},  //
1050        {0x19d2, 0x0330, "option", 1, 2, 2, NULL, "ZTE MF826 (modem)"}, // also qmi but not yet in driver
1051//      {0x19d2, 0x0349, NULL, NODEV, NODEV, 2 | ETH, NULL, "ZTE MF821D (modem)"},        // ecm attributes, might be QMI
1052//      {0x19d2, 0x0387, NULL, NODEV, NODEV, 2 | ETH, NULL, "ZTE MF827 (modem)"}, // ecm attributes, might be QMI
1053        {0x19d2, 0x0388, "option", 0, 0, 2, &modeswitch_others, "ZTE MF827 (cdrom)"},   //
1054        {0x19d2, 0x0412, "option", 2, 3, 2 | QMI, NULL, "Telewell TW-LTE 4G (modem)"},  //
1055        {0x19d2, 0x0413, "option", 0, 0, 2, &modeswitch_others, "Telewell TW-LTE 4G (cdrom)"},  //
1056        {0x19d2, 0x1001, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE K3805-Z (cdrom)"},      //
1057        {0x19d2, 0x1003, "option", 1, 0, 2 | ACM, NULL, "ZTE K3805-Z (modem)"}, // also cdc_ether
1058        {0x19d2, 0x1007, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE K3570-Z (cdrom)"},      //
1059        {0x19d2, 0x1008, "option", 1, 3, 2 | QMI, NULL, "ZTE K3570-Z (modem)"}, //
1060        {0x19d2, 0x1009, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE K3571-Z (cdrom)"},      //
1061        {0x19d2, 0x1010, "option", 1, 3, 2 | QMI, NULL, "ZTE K3571-Z (modem)"}, //
1062        {0x19d2, 0x1013, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE K3806-Z (cdrom)"},      //
1063        {0x19d2, 0x1015, "option", 1, 0, 2 | ACM, NULL, "ZTE K3806-Z (modem)"}, // also cdc_ether
1064        {0x19d2, 0x1017, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE K5006-Z (cdrom)"},      //
1065        {0x19d2, 0x1018, "option", 1, 2, 2 | QMI, NULL, "ZTE K5006-Z (modem)"}, //
1066        {0x19d2, 0x1019, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE R203 (cdrom)"}, //
1067        {0x19d2, 0x1020, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE R203 (cdrom)"}, //
1068        {0x19d2, 0x1021, "option", 1, 2, 2 | QMI, NULL, "ZTE R203 (modem)"},    //
1069        {0x19d2, 0x1022, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE K4201-Z (cdrom)"},      // also cdc_mbim
1070//      {0x19d2, 0x1023, NULL, NODEV, NODEV, 0 | ETH, NULL, "ZTE K4201-Z (modem)"},       //
1071        {0x19d2, 0x1026, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE R212 (cdrom)"}, //
1072        {0x19d2, 0x1030, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE K5008-Z (cdrom)"},      // also cdc_mbim
1073//      {0x19d2, 0x1032, NULL, NODEV, NODEV, 0 | ETH, NULL, "ZTE K5008-Z (modem)"},       //
1074        {0x19d2, 0x1034, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE R206-z (cdrom)"},       //
1075        {0x19d2, 0x1038, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE K4607-Z (cdrom)"},      //
1076//      {0x19d2, 0x1040, NULL, NODEV, NODEV, 0 | ETH, NULL, "ZTE K4607-Z (modem)"},       //
1077        {0x19d2, 0x1042, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE R209-z (cdrom)"},       //
1078        {0x19d2, 0x1171, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE K4510-Z (cdrom)"},      //
1079        {0x19d2, 0x1172, "option", 0, 0, 2 | ACM, NULL, "ZTE K4510-Z (modem)"}, // also cdc_ether
1080        {0x19d2, 0x1173, "option", 0, 0, 2 | ACM, NULL, "ZTE K4510-Z (modem)"}, // also cdc_ether
1081        {0x19d2, 0x1175, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE K3770-Z (cdrom)"},      //
1082        {0x19d2, 0x1176, "option", 0, 0, 2 | QMI, NULL, "ZTE K3770-Z (modem)"}, //
1083        {0x19d2, 0x1177, "option", 0, 0, 2 | ACM, NULL, "ZTE K3770-Z (modem)"}, // also cdc_ether
1084        {0x19d2, 0x1179, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE K3772-Z (cdrom)"},      //
1085        {0x19d2, 0x1181, "option", 0, 0, 2 | ACM, NULL, "ZTE K3772-Z (modem)"}, // also cdc_ether
1086        {0x19d2, 0x1201, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF691 (cdrom)"},        //
1087        {0x19d2, 0x1203, "option", 0, 0, 2 | ACM, NULL, "ZTE MF691 (modem)"},   //
1088        {0x19d2, 0x1207, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF192 (cdrom)"},        //
1089        {0x19d2, 0x1208, "option", 0, 0, 2 | ACM, NULL, "ZTE MF192 (modem)"},   //
1090        {0x19d2, 0x1210, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF195 (cdrom)"},        //
1091        {0x19d2, 0x1211, "option", 0, 0, 2 | ACM, NULL, "ZTE MF195 (modem)"},   // also cdc_ether
1092        {0x19d2, 0x1212, "option", 0, 0, 2 | ACM, NULL, "ZTE MF195 (modem)"},   //
1093        {0x19d2, 0x1216, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF192 (cdrom)"},        //
1094        {0x19d2, 0x1217, "option", 0, 0, 2 | ACM, NULL, "ZTE MF192"},   // also cdc_ether
1095        {0x19d2, 0x1218, "option", 0, 0, 2 | ACM, NULL, "ZTE MF192"},   //
1096        {0x19d2, 0x1219, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF192 (cdrom)"},        //
1097        {0x19d2, 0x1220, "option", 0, 0, 2 | ACM, NULL, "ZTE MF192"},   // also cdc_ether
1098        {0x19d2, 0x1222, "option", 0, 0, 2 | ACM, NULL, "ZTE MF192"},   // also cdc_ether
1099        {0x19d2, 0x1224, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF190 (cdrom)"},        //
1100        {0x19d2, 0x1225, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF667 (cdrom)"},        //
1101        {0x19d2, 0x1227, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF669 (cdrom)"},        //
1102        {0x19d2, 0x1232, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF193A (cdrom)"},       //
1103        {0x19d2, 0x1233, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF667 (cdrom)"},        //
1104        {0x19d2, 0x1237, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE K4201-z I (cdrom)"},    //
1105        {0x19d2, 0x1238, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF825A (cdrom)"},       //
1106        {0x19d2, 0x1245, "option", 1, 0, 2 | QMI, NULL, "ZTE MF680 (modem)"},   //
1107        {0x19d2, 0x1252, "option", 1, 3, 2 | QMI, NULL, "ZTE MF669 (modem)"},   //
1108        {0x19d2, 0x1253, "option", 1, 3, 2, NULL, "Prolink PHS300 (modem)"},    //
1109        {0x19d2, 0x1254, "option", 1, 3, 2 | QMI, NULL, "ZTE MF190 (modem)"},   //
1110        {0x19d2, 0x1256, "option", 1, 0, 2 | QMI, NULL, "ZTE MF190 (modem)"},   //
1111        {0x19d2, 0x1268, "option", 1, 3, 2, NULL, "ZTE MF667 (modem)"}, // also qmi but not yet in driver
1112        {0x19d2, 0x1270, "option", 1, 4, 2 | QMI, NULL, "ZTE MF667 (modem)"},   //
1113        {0x19d2, 0x1300, "option", 2, 0, 2, NULL, "ZTE MF220 (modem)"}, //
1114        {0x19d2, 0x1401, "option", 0, 0, 2 | QMI, NULL, "ZTE MF60 (modem)"},    //
1115        {0x19d2, 0x1402, "option", 1, 1, 2 | QMI, NULL, "ZTE MF60 (modem)"},    //
1116//      {0x19d2, 0x1403, NULL, NODEV, NODEV, 0 | RNDIS, NULL, "ZTE MF825A (modem)"},      //
1117//      {0x19d2, 0x1405, NULL, NODEV, NODEV, 0 | ETH, NULL, "ZTE MF667 (modem)"}, // qmi tested - failed
1118//      {0x19d2, 0x1408, NULL, NODEV, NODEV, 0 | ETH, NULL, "ZTE MF825A (modem)"},        // qmi tested - failed
1119        {0x19d2, 0x1420, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF730 (cdrom)"},        //
1120        {0x19d2, 0x1426, "option", 1, 0, 2 | QMI, NULL, "ZTE MF91D (modem)"},   //
1121        {0x19d2, 0x1428, "option", 1, 0, 2 | QMI, NULL, "Telewell TW-LTE 4G v2 (modem)"},       //
1122        {0x19d2, 0x1511, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MFxxx (cdrom)"},        //
1123        {0x19d2, 0x1512, "option", 0, 0, 2 | ACM, NULL, "ZTE MFxxx (modem)"},   // also cdc_ether
1124        {0x19d2, 0x1514, "option", 0, 0, 2, &modeswitch_onda, "ZTE MF192 (cdrom)"},     //
1125        {0x19d2, 0x1515, "option", 0, 0, 2 | ACM, NULL, "ZTE MF192 (modem)"},   //
1126        {0x19d2, 0x1517, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF192 (cdrom)"},        //
1127        {0x19d2, 0x1518, "option", 0, 0, 2 | ACM, NULL, "ZTE MF192 (modem)"},   //
1128        {0x19d2, 0x1519, "option", 0, 0, 2 | ACM, NULL, "ZTE MF192 (modem)"},   //
1129        {0x19d2, 0x1520, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF652 (cdrom)"},        //
1130        {0x19d2, 0x1522, "option", 0, 0, 2 | ACM, NULL, "ZTE MF652 (modem)"},   //
1131        {0x19d2, 0x1523, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF591 (cdrom)"},        //
1132        {0x19d2, 0x1525, "option", 0, 0, 2 | ACM, NULL, "ZTE MF591 (modem)"},   //
1133        {0x19d2, 0x1527, "option", 0, 0, 2 | ACM, NULL, "ZTE MF196 (modem)"},   //
1134        {0x19d2, 0x1528, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF196 (cdrom)"},        //
1135        {0x19d2, 0x1529, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MFxxx (cdrom)"},        //
1136        {0x19d2, 0x1530, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MFxxx (cdrom)"},        //
1137        {0x19d2, 0x1536, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF190J (cdrom)"},       //
1138        {0x19d2, 0x1537, "option", 0, 0, 2 | ACM, NULL, "ZTE MF190J (modem)"},  // also cdc_ether
1139        {0x19d2, 0x1538, "option", 0, 0, 2 | ACM, NULL, "ZTE MF190J (modem)"},  // also cdc_ether
1140        {0x19d2, 0x1542, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF190J (cdrom)"},       //
1141        {0x19d2, 0x1544, "option", 0, 0, 2 | ACM, NULL, "ZTE MF190J (modem)"},  //
1142        {0x19d2, 0x1580, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF195E (cdrom)"},       //
1143        {0x19d2, 0x1582, "option", 0, 0, 2 | ACM, NULL, "ZTE MF195E (modem)"},  //
1144        {0x19d2, 0x1588, "option", 0, 0, 2, &modeswitch_zte, "ZTE MF710 (cdrom)"},      //
1145        {0x19d2, 0x1589, "option", 3, 2, 2, NULL, "ZTE MF710 (modem)"}, // also cdc_ether
1146        {0x19d2, 0x1592, "option", 3, 2, 2, NULL, "ZTE MF710 (modem)"}, // also cdc_ether
1147        {0x19d2, 0x1595, "option", 0, 0, 2, &modeswitch_zte, "ZTE MF710 (cdrom)"},      //
1148        {0x19d2, 0x1600, "option", 3, 2, 2, NULL, "ZTE MF710 (modem)"}, // also cdc_ether
1149        {0x19d2, 0x2000, "option", 0, 0, 2, &modeswitch_zte, "ONDA/ZTE (cdrom)"},       //
1150        {0x19d2, 0x2002, "option", 1, 3, 2 | QMI, NULL, "ZTE K3765-Z (modem)"}, //
1151        {0x19d2, 0x2003, "option", 1, 3, 2, NULL, "ZTE MF180 (modem)"}, //
1152        {0x19d2, 0x2004, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE MF60 (cdrom)"}, //
1153        {0x19d2, 0xffdd, "option", 1, 0, 2 | GENERIC, NULL, "ZTE AC682 (modem)"},       //
1154        {0x19d2, 0xffde, "option", 0, 0, 2, &modeswitch_std_eject, "ZTE AC682 (cdrom)"},        //
1155        {0x19d2, 0xffe4, "option", 1, 0, 2 | GENERIC, NULL, "ZTE AC3781 (modem)"},      //
1156        {0x19d2, 0xffe8, "option", 1, 0, 2, NULL, "ZTE MC2718 (modem)"},        //
1157        {0x19d2, 0xffe9, "option", 1, 0, 2, NULL, "ZTE AC2738 (modem)"},        //
1158        {0x19d2, 0xffeb, "option", 0, 3, 2, NULL, "ZTE AD3812 (modem)"},        //
1159        {0x19d2, 0xffed, "option", 1, 0, 2, NULL, "ZTE MC2716 (modem)"},        //
1160        {0x19d2, 0xfff1, "option", 1, 0, 2, NULL, "ZTE generic (modem)"},       //
1161        {0x19d2, 0xfff3, "qcserial", 1, 2, 2 | QMI, NULL, "ZTE generic (modem)"},       //
1162        {0x19d2, 0xfff5, "option", 0, 0, 2, &modeswitch_others, "ZTE generic (cdrom)"}, //
1163        {0x19d2, 0xfff6, "option", 0, 0, 2, &modeswitch_others, "ZTE generic (cdrom)"}, //
1164        {0x19d2, 0xfffb, "option", 1, 0, 2, NULL, "ZTE MG880 (modem)"}, //
1165        {0x19d2, 0xfffc, "option", 1, 0, 2, NULL, "ZTE MG880 (modem)"}, //
1166        {0x19d2, 0xfffd, "option", 1, 0, 2, NULL, "ZTE MG880 (modem)"}, //
1167        {0x19d2, 0xfffe, "option", 1, 0, 2, NULL, "ZTE AC8700 (modem)"},        //
1168        {0x19d2, 0xffff, "option", 1, 0, 2, NULL, "ZTE AC8710 (modem)"},        //
1169
1170/* Infomark */
1171//      {0x19f2, 0x1700, "option", 0, 0, 0 | ETH, NULL, "Clear Spot Voyager mifi"}, //
1172
1173/* Qualcomm */
1174        {0x19f5, 0x9905, "option", 2, 1, 2 | GENERIC, NULL, "Venus Fast2 (modem)"},     //
1175        {0x19f5, 0x9909, "option", 2, 1, 2 | GENERIC, NULL, "Venus Fast2 (modem)"},     //
1176        {0x19f5, 0xf000, "option", 0, 0, 2, &modeswitch_std_eject, "Advan Jetx DT-8 (cdrom)"},  //
1177
1178/* Bandrich */
1179        {0x1a8d, 0x1000, "option", 0, 0, 2, &modeswitch_std_eject, "Bandrich C-1xx/C-270/C-32x (cdrom)"},       //
1180//      {0x1a8d, 0x1001, "option", 1, NULL, 2 | ETH, NULL, "Bandrich C-100/C-120 (netif)"},   //
1181        {0x1a8d, 0x1002, "option", 1, 0, 2, NULL, "Bandrich C-100/C-120 (modem)"},      //
1182        {0x1a8d, 0x1003, "option", 1, 0, 2, NULL, "Bandrich C-100/C-120 (modem)"},      //
1183        {0x1a8d, 0x1007, "option", 2, 0, 2, NULL, "Bandrich C-270 (modem)"},    //
1184        {0x1a8d, 0x1008, "option", 2, 0, 2, NULL, "Bandrich M250 (modem)"},     //
1185        {0x1a8d, 0x1009, "option", 2, 0, 2, NULL, "Bandrich C-170/C-180 (modem)"},      //
1186        {0x1a8d, 0x100c, "option", 2, 0, 2, NULL, "Bandrich C-320 (modem)"},    // also cdc_ether
1187        {0x1a8d, 0x100d, "option", 2, 0, 2, NULL, "Bandrich C-508 (modem)"},    // also cdc_ether
1188        {0x1a8d, 0x2000, "option", 0, 0, 2, &modeswitch_std_eject, "Bandrich C33x (cdrom)"},    //
1189        {0x1a8d, 0x2006, "option", 1, 1, 2 | ACM, NULL, "Bandrich C-33x (modem)"},      //
1190
1191/* Datang */
1192        {0x1ab7, 0x2000, "option", 0, 0, 2 | GENERIC, NULL, "Aircard 901 (modem)"},     //
1193        {0x1ab7, 0x5700, "option", 0, 0, 2, &modeswitch_std_eject, "Datang DTM573x (cdrom)"},   //
1194        {0x1ab7, 0x5730, "option", 3, 1, 2 | GENERIC, NULL, "Datang DTM5730 (modem)"},  //
1195        {0x1ab7, 0x5731, "option", 3, 1, 2 | GENERIC, NULL, "Datang DTM5731 (modem)"},  //
1196
1197/* T&A Mobile Phones (Alcatel) */
1198        {0x1bbb, 0x0000, "option", 2, 2, 2, NULL, "Alcatel X060S/X070S/X080S/X200 (modem)"},    //
1199        {0x1bbb, 0x0012, "option", 2, 2, 2 | GENERIC, NULL, "Alcatel X085C (modem)"},   //
1200        {0x1bbb, 0x0017, "option", 4, 4, 2, NULL, "Alcatel X220L (Variant), X500D (modem)"},    //
1201        {0x1bbb, 0x0052, "option", 4, 4, 2, NULL, "Alcatel X220L (Variant), (modem)"},  //
1202        {0x1bbb, 0x00b7, "option", 0, 4, 2, NULL, "Alcatel X600 (modem)"},      //
1203        {0x1bbb, 0x00ca, "option", 0, 0, 2 | GENERIC, NULL, "Alcatel X080C (modem)"},   //
1204        {0x1bbb, 0x011e, "option", 1, 2, 2 | QMI, NULL, "Alcatel L100V, (modem)"},      //
1205//      {0x1bbb, 0x0195, NULL, NODEV, NODEV, 0 | RNDIS, NULL, "Alcatel L800, (modem)"},   //
1206        {0x1bbb, 0x0203, "option", 0, 1, 2 | QMI, NULL, "Alcatel L800Z, (modem)"},      //
1207        {0x1bbb, 0x022c, "option", 2, 1, 2 | GENERIC, &select_config2, "Alcatel X602D (modem)"},        //
1208        {0x1bbb, 0xf000, "option", 0, 0, 2, &modeswitch_alcatel, "Alcatel X060S/X070S/X080S/X200/X220L/X500D(cdrom)"},  //
1209        {0x1bbb, 0xf017, "option", 0, 0, 2, &modeswitch_alcatel, "Alcatel X220D (cdrom)"},      //
1210        {0x1bbb, 0xf052, "option", 0, 0, 2, &modeswitch_alcatel, "Alcatel X220L (cdrom)"},      //
1211        {0x1bbb, 0xf0b6, "option", 0, 0, 2, &modeswitch_alcatel, "Alcatel X550L (cdrom)"},      //
1212        {0x1bbb, 0xf0b7, "option", 0, 0, 2, &modeswitch_alcatel, "Alcatel X600L (cdrom)"},      //
1213
1214/* Telit */
1215        {0x1bc7, 0x0021, "option", 0, 0, 2 | ACM, NULL, "Telit HE910, (modem)"},        //
1216        {0x1bc7, 0x1010, "option", 0, 0, 2 | ACM, NULL, "Telit DE910, (modem)"},        //
1217        {0x1bc7, 0x1201, NULL, NODEV, NODEV, 0 | QMI, NULL, "Telit LE910, (modem)"},    //
1218
1219/* Longcheer */
1220        {0x1c9e, 0x1001, "option", 0, 0, 2, &modeswitch_alcatel, "Alcatel X020 & X030 (cdrom)"},        //
1221        {0x1c9e, 0x3197, "option", 1, 0, 2 | GENERIC, NULL, "SEV759 (modem)"},  //
1222        {0x1c9e, 0x6000, "option", 2, 0, 2 | GENERIC, &modeswitch_rezero, "Alcatel X020 & X030 (modem)"},       //
1223        {0x1c9e, 0x6060, "option", 2, 0, 2 | GENERIC, &modeswitch_rezero, "TU930"},     //
1224        {0x1c9e, 0x6061, "option", 2, 0, 2 | GENERIC, NULL, "Alcatel X020 & X030 (modem)"},     //
1225        {0x1c9e, 0x9000, "option", 1, 2, 2 | GENERIC, NULL, "4G Systems XS Stick W14 (modem)"}, //
1226        {0x1c9e, 0x9101, "option", 0, 0, 2, &modeswitch_alcatel, "EMobile D12LC (cdrom)"},      //
1227        {0x1c9e, 0x9104, "option", 1, 2, 2 | GENERIC, NULL, "EMobile D12LC(modem)"},    //
1228        {0x1c9e, 0x9401, "option", 0, 0, 2, &modeswitch_alcatel, "EMobile D21LC (cdrom)"},      //
1229        {0x1c9e, 0x9404, "option", 1, 2, 2 | GENERIC, NULL, "EMobile D21LC(modem)"},    //
1230        {0x1c9e, 0x9603, "option", 1, 2, 2, NULL, "4G Systems XS Stick W14 (modem)"},   //
1231        {0x1c9e, 0x9605, "option", 1, 3, 2, NULL, "4G Systems XS Stick W14 (modem)"},   //
1232        {0x1c9e, 0x9607, "option", 1, 3, 2, NULL, "4G Systems XS Stick W14 (modem)"},   //
1233        {0x1c9e, 0x9800, "option", 2, 1, 2 | GENERIC, &modeswitch_alcatel, "SU-9800 (modem)"},  //
1234        {0x1c9e, 0x9801, "option", 2, 1, 2 | GENERIC, NULL, "4G Systems XS Stick W21 (modem)"}, // also qmi but not yet in driver
1235        {0x1c9e, 0x9803, "option", 2, 1, 2 | GENERIC, NULL, "SmartBro WM66E (modem)"},  // also qmi but not yet in driver
1236        {0x1c9e, 0x98ff, "option", 0, 0, 2, &modeswitch_alcatel, "4G Systems XS Stick W21 (cdrom)"},    //
1237        {0x1c9e, 0x9900, "option", 1, 2, 2 | GENERIC, NULL, "Softbank C02LC (modem)"},  //
1238        {0x1c9e, 0x9a00, "option", 2, 0, 2 | GENERIC, NULL, "4G Systems XS Stick TV (modem)"},  //
1239        {0x1c9e, 0x9d00, "option", 2, 3, 2 | GENERIC, &modeswitch_alcatel, "Prolink PCM100 (cdrom)"},   //
1240        {0x1c9e, 0x9e00, "option", 2, 0, 2 | GENERIC, &modeswitch_alcatel, "MMX 310C"}, //
1241        {0x1c9e, 0xf000, "option", 0, 0, 2, &modeswitch_alcatel, "4G Systems XS Stick W14 (cdrom)"},    //
1242        {0x1c9e, 0xf001, "option", 0, 0, 2, &modeswitch_alcatel, "Alcatel AD110 (cdrom)"},      //
1243
1244/* TechFaith */
1245        {0x1d09, 0x1000, "option", 0, 0, 2, &modeswitch_std_eject, "Techfaith (cdrom)"},        //
1246        {0x1d09, 0x1010, "option", 2, 0, 2 | GENERIC, NULL, "Aiko 81D (modem)"},        //
1247        {0x1d09, 0x1011, "option", 2, 0, 2 | GENERIC, NULL, "Pretec H550 (modem)"},     //
1248        {0x1d09, 0x1021, "option", 0, 0, 2, &modeswitch_std_eject, "Aiko 81D (cdrom)"}, //
1249        {0x1d09, 0x1025, "option", 0, 0, 2, &modeswitch_std_eject, "TechFaith FlyingLARK46 (cdrom)"},   //
1250        {0x1d09, 0x1026, "option", 1, 2, 2 | GENERIC, NULL, "TechFaith FlyingLARK46 (modem)"},  //
1251        {0x1d09, 0x4306, "option", 2, 0, 2 | GENERIC, NULL, "TechFaith Venus VT18 (modem)"},    //
1252
1253/* Teltonika */
1254        {0x1d12, 0xf00e, "option", 0, 0, 2, &modeswitch_std_eject, "Teltonika UM5100 (cdrom)"}, //
1255
1256/* Wisue */
1257        {0x1dbc, 0x0005, "option", 0, 0, 2 | ACM, NULL, "Vodafone MD950 (modem)"},      //
1258        {0x1dbc, 0x0669, "option", 0, 0, 2 | ACM, &select_config2, "Wisue W340 (modem)"},       //
1259        {0x1dbc, 0x8005, "option", 0, 0, 2 | ACM, NULL, "EDGE Modem (modem)"},  //
1260
1261/* Qualcomm /ALink /Hyundai */
1262        {0x1e0e, 0x9000, "option", 1, 2, 3, NULL, "PROLink PHS100, Hyundai MB-810, A-Link 3GU (modem)"},        //
1263        {0x1e0e, 0x9001, "option", 1, 2, 3, NULL, "Simcom SIM7100"},    //
1264        {0x1e0e, 0x9100, "option", 1, 2, 3, NULL, "PROLink PHS300, A-Link 3GU (modem)"},        //
1265        {0x1e0e, 0x9200, "option", 1, 2, 3, NULL, "PROLink PHS100, Hyundai MB-810, A-Link 3GU (modem)"},        //
1266        {0x1e0e, 0x9a00, "option", 1, 2, 3 | GENERIC, NULL, "PROLink PEM330 (modem)"},  // also qmi but not yet in driver
1267        {0x1e0e, 0xce16, "option", 1, 2, 3, NULL, "D-Link DWM-162U5, Micromax MMX 300c (modem)"},       //
1268        {0x1e0e, 0xce17, "option", 1, 0, 3 | GENERIC, NULL, "D-Link DWM-162 C1 (modem)"},       //
1269        {0x1e0e, 0xce1e, "option", 1, 2, 3, NULL, "D-Link DWM-162U5 A1 (modem)"},       //
1270        {0x1e0e, 0xce28, "option", 1, 2, 3 | GENERIC, NULL, "SpeedUP SU-7000U (modem)"},        //
1271        {0x1e0e, 0xcefe, "option", 1, 2, 3 | GENERIC, NULL, "Simcom EM600, Micromax MMX 300c (modem)"}, //
1272        {0x1e0e, 0xf000, "option", 0, 0, 3, &modeswitch_others, "PROLink PHS100, Hyundai MB-810, A-Link 3GU (cdrom)"},  //
1273
1274/* SelectWireless */
1275        {0x1edf, 0x6003, "option", 0, 0, 2 | ACM, &select_config2, "AirPlus MCD-800"},  //
1276        {0x1edf, 0x6004, "option", 1, 0, 2 | ACM, NULL, "AirPlus MCD-640/650"}, //
1277
1278/* Onda */
1279        {0x1ee8, 0x0003, "option", 0, 0, 2, &modeswitch_onda, "Onda MV815UP (cdrom)"},  //
1280        {0x1ee8, 0x0004, "option", 1, 0, 2 | ACM, NULL, "Onda MV815UP (modem)"},        //
1281        {0x1ee8, 0x0009, "option", 0, 0, 2, &modeswitch_onda, "Onda MW823UP (cdrom)"},  //
1282        {0x1ee8, 0x000b, "option", 1, 0, 2 | ACM, NULL, "Onda MW823UP (modem)"},        //
1283        {0x1ee8, 0x0011, "option", 1, 0, 2 | ACM, NULL, "Onda MDC835UP (modem)"},       //
1284        {0x1ee8, 0x0012, "option", 1, 0, 2 | ACM, NULL, "Onda MW833UP (modem)"},        //
1285        {0x1ee8, 0x0013, "option", 0, 0, 2, &modeswitch_onda, "Onda MW833UP/MT835UP (cdrom)"},  //
1286        {0x1ee8, 0x0014, "option", 1, 0, 2 | ACM, NULL, "Onda MT835UP (modem)"},        //
1287        {0x1ee8, 0x0017, "option", 1, 0, 2 | ACM, NULL, "Onda MO835UP (modem)"},        //
1288        {0x1ee8, 0x0018, "option", 0, 0, 2, &modeswitch_onda, "Onda MO835UP (cdrom)"},  //
1289        {0x1ee8, 0x003e, "option", 1, 0, 2 | ACM, NULL, "Onda MW836UP (modem)"},        //
1290        {0x1ee8, 0x0040, "option", 0, 0, 2, &modeswitch_onda, "Onda MW836UP (cdrom)"},  //
1291        {0x1ee8, 0x0044, "option", 1, 0, 2 | ACM, NULL, "Onda MDC655 (modem)"}, //
1292        {0x1ee8, 0x0045, "option", 0, 0, 2, &modeswitch_onda, "Onda MDC655 (cdrom)"},   //
1293        {0x1ee8, 0x0049, "option", 1, 0, 2 | ACM, NULL, "Onda MDC655 (modem)"}, //
1294        {0x1ee8, 0x004a, "option", 0, 0, 2, &modeswitch_onda, "Onda MDC655 (cdrom)"},   //
1295        {0x1ee8, 0x004e, "option", 1, 0, 2 | ACM, NULL, "Onda MDC655 (modem)"}, //
1296        {0x1ee8, 0x004f, "option", 0, 0, 2, &modeswitch_onda, "Onda MDC655 (cdrom)"},   //
1297        {0x1ee8, 0x0053, "option", 1, 0, 2 | ACM, NULL, "Onda MW875UP (modem)"},        //
1298        {0x1ee8, 0x0054, "option", 0, 0, 2, &modeswitch_onda, "Onda MW875UP (cdrom)"},  //
1299        {0x1ee8, 0x005f, "option", 1, 0, 2 | ACM, NULL, "Onda MSA 14.4 (modem)"},       //
1300        {0x1ee8, 0x0060, "option", 0, 0, 2, &modeswitch_onda, "Onda MSA 14.4 (cdrom)"}, //
1301        {0x1ee8, 0x0063, "option", 0, 0, 2, &modeswitch_onda, "Onda TM201 (cdrom)"},    //
1302        {0x1ee8, 0x0064, "option", 1, 0, 2 | ACM, NULL, "Onda TM201 (modem)"},  //
1303        {0x1ee8, 0x0068, "option", 0, 0, 2, &modeswitch_onda, "Onda WM301 (cdrom)"},    //
1304        {0x1ee8, 0x0069, "option", 1, 0, 2 | ACM, NULL, "Onda WM301 (modem)"},  //
1305
1306/* Franklin Wireless */
1307        {0x1fac, 0x0032, "option", 0, 0, 2 | ACM, &select_config2, "Franklin U210"},    //
1308        {0x1fac, 0x0150, "option", 0, 0, 2, &modeswitch_std_eject, "Franklin U600 (cdrom)"},    //
1309        {0x1fac, 0x0151, "option", 0, 0, 2 | ACM, NULL, "Franklin U600 (modem)"},       //
1310//      {0x1fac, 0x0232, NULL, NODEV, NODEV, 0 | RNDIS, NULL, "Franklin U770 (modem)"},   //
1311
1312/* Vertex Wireless */
1313        {0x1fe7, 0x0100, "option", 0, 0, 2 | ACM, NULL, "Vertex VWM100 series (modem)"},        //
1314
1315/* D-Link (2nd VID) */
1316        {0x2001, 0x00a6, "option", 0, 0, 2, &modeswitch_std_eject, "D-Link DWM-157 B1 (cdrom)"},        // also cdc_mbim
1317        {0x2001, 0x00a7, "option", 0, 0, 2, &modeswitch_std_eject, "D-Link DWM-157 C1 (cdrom)"},        // also cdc_mbim
1318        {0x2001, 0x7600, "option", 2, 1, 2 | GENERIC, &select_config2, "D-Link DWM-157 B1 (cdrom)"},
1319        {0x2001, 0x7900, "option", 1, 3, 2 | GENERIC, NULL, "D-Link DWM-157 A1 (modem)"},       //
1320        {0x2001, 0x7d00, "option", 1, 0, 2 | GENERIC, NULL, "D-Link DWM-156 A6 (modem)"},       //
1321        {0x2001, 0x7d01, "option", 1, 0, 2, NULL, "D-Link DWM-156 A7 (modem)"}, // also cdc_mbim
1322        {0x2001, 0x7d02, "option", 1, 0, 2, NULL, "D-Link DWM-157 B1 (modem)"}, // also cdc_mbim
1323        {0x2001, 0x7d03, "option", 1, 0, 2, NULL, "D-Link DWM-158 D1 (modem)"}, // also cdc_mbim
1324        {0x2001, 0x7d04, "option", 1, 0, 2, NULL, "D-Link DWM-158 D1 (modem)"}, // also cdc_ether
1325        {0x2001, 0x7d0b, "option", 3, 2, 2 | GENERIC, NULL, "D-Link DWM-156 A8 (modem)"},       // also cdc_mbim
1326        {0x2001, 0x7d0c, "option", 3, 2, 2 | GENERIC, NULL, "D-Link DWP-157 B1 (modem)"},       // also cdc_mbim
1327        {0x2001, 0x7d0d, "option", 3, 2, 2 | GENERIC, NULL, "D-Link DWM-167 A1 (modem)"},       // also cdc_mbim
1328        {0x2001, 0x7d0e, "option", 3, 2, 2 | GENERIC, NULL, "D-Link DWM-157 C1 (modem)"},       // also cdc_mbim
1329        {0x2001, 0x7d10, "option", 3, 2, 2 | GENERIC, NULL, "D-Link DWM-156 A8 (modem)"},       // also cdc_mbim
1330        {0x2001, 0x7e16, "option", 2, 1, 2 | GENERIC, NULL, "D-Link DWM-221 A1 (modem)"},       // also qmi but not yet in driver
1331        {0x2001, 0x7e19, "option", 2, 1, 2 | QMI, NULL, "D-Link DWM-221 B1 (modem)"},   //
1332        {0x2001, 0x7e35, "option", 2, 1, 2 | GENERIC, NULL, "D-Link DWM-222 A1 (modem)"},       // also qmi but not yet in driver
1333//      {0x2001, 0x7e38, NULL, NODEV, NODEV, 2 | ETH, NULL, "D-Link DWR-910 (modem)"},    //
1334        {0x2001, 0x98ff, "option", 0, 0, 2, &modeswitch_alcatel, "D-Link DWM-221 A1 (cdrom)"},  //
1335        {0x2001, 0xa401, "option", 0, 0, 2, &modeswitch_std_eject, "D-Link DWM-221 B1 (cdrom)"},        //
1336        {0x2001, 0xa403, "option", 0, 0, 2, &modeswitch_std_eject, "D-Link DWM-156 A8 (cdrom)"},        //
1337        {0x2001, 0xa405, "option", 0, 0, 2, &modeswitch_std_eject, "D-Link DWM-167 A1 (cdrom)"},        //
1338        {0x2001, 0xa406, "option", 0, 0, 2, &modeswitch_std_eject, "D-Link DWM-221 B1 (cdrom)"},        //
1339        {0x2001, 0xa407, "option", 0, 0, 2, &modeswitch_std_eject, "D-Link DWM-157 C1 (cdrom)"},        //
1340        {0x2001, 0xa40a, "option", 0, 0, 2, &modeswitch_mediatek, "D-Link DWM-156 A8 (cdrom)"}, //
1341        {0x2001, 0xa40d, "option", 0, 0, 2, &modeswitch_std_eject, "D-Link DWR-910 (cdrom)"},   //
1342        {0x2001, 0xa706, "option", 0, 0, 2, &modeswitch_std_eject, "D-Link DWM-156 A7 (cdrom)"},        //
1343        {0x2001, 0xa707, "option", 0, 0, 2, &modeswitch_std_eject, "D-Link DWM-157 B1 (cdrom)"},        //
1344        {0x2001, 0xa708, "option", 0, 0, 2, &modeswitch_std_eject, "D-Link DWM-158 D1 (cdrom)"},        //
1345        {0x2001, 0xa809, "option", 0, 0, 2, &modeswitch_std_eject, "D-Link DWM-157 A1 (cdrom)"},        //
1346        {0x2001, 0xa80b, "option", 0, 0, 2, &modeswitch_mediatek, "D-Link DWM-156 A6 (cdrom)"}, //
1347        {0x2001, 0xab00, "option", 0, 0, 2, &modeswitch_mediatek, "D-Link DWM-222 A1 (cdrom)"}, //
1348
1349/* Haier */
1350        {0x201e, 0x1022, "option", 0, 0, 2 | GENERIC, NULL, "Haier CE862"},     //
1351        {0x201e, 0x1023, "option", 0, 0, 2, &modeswitch_std_eject, "Haier CE682"},      //
1352        {0x201e, 0x10f8, "option", 2, 3, 2, NULL, "Haier CE81B"},       //
1353        {0x201e, 0x2009, "option", 2, 0, 2, &modeswitch_std_eject, "Haier CE100/CE210"},        //
1354
1355/* VisionTek ?? */
1356        {0x2020, 0x0002, "option", 0, 0, 2, &modeswitch_mediatek, "MicroMax MMX 377G (cdrom)"}, //
1357        {0x2020, 0x1005, "option", 1, 3, 2 | GENERIC, NULL, "SpeedUp SU-8000U (modem)"},        //
1358        {0x2020, 0x1008, "option", 1, 3, 2 | GENERIC, NULL, "SpeedUp SU-9300U (modem)"},        //
1359        {0x2020, 0x1012, "option", 1, 3, 2 | GENERIC, NULL, "Prolink PHS100 (modem)"},  //
1360        {0x2020, 0x2000, "option", 1, 0, 2 | GENERIC, NULL, "Beetel BG64 (modem)"},     //
1361        {0x2020, 0x4000, "option", 1, 0, 2 | GENERIC, NULL, "Rostelecom Sense R41 (modem)"},    // also mbim
1362        {0x2020, 0x4002, "option", 1, 0, 2 | GENERIC, NULL, "Rostelecom Sense R41 (modem)"},    // also mbim
1363        {0x2020, 0x4010, "option", 1, 0, 2 | GENERIC, NULL, "MicroMax MMX 377G (modem)"},       // also mbim
1364        {0x2020, 0xf00e, "option", 0, 0, 2, &modeswitch_std_eject, "SpeedUp SU-8000 (cdrom)"},  //
1365        {0x2020, 0xf00f, "option", 0, 0, 2, &modeswitch_std_eject, "SpeedUp SU-8000U (cdrom)"}, //
1366
1367/* ChangHong */
1368        {0x2077, 0x1000, "option", 0, 0, 2, &modeswitch_std_eject, "Axesstel MV242 (cdrom)"},   //
1369        {0x2077, 0x7001, "option", 1, 0, 2, NULL, "ChangHong CH690 (modem)"},   //
1370        {0x2077, 0x7010, "option", 1, 0, 2 | GENERIC, NULL, "D-Link DWM-163 (modem)"},  //
1371        {0x2077, 0x7011, "option", 1, 0, 2 | GENERIC, NULL, "D-Link DWM-168 (modem)"},  //
1372        {0x2077, 0x8000, "option", 1, 0, 2 | GENERIC, NULL, "Axesstel MV242 (modem)"},  //
1373        {0x2077, 0x9062, "option", 1, 3, 2 | GENERIC, NULL, "D-Link DWM-155 (modem)"},  //
1374        {0x2077, 0x9000, "option", 1, 2, 2 | GENERIC, NULL, "Nucom W-160 (modem)"},     //
1375        {0x2077, 0xa000, "option", 1, 2, 2 | GENERIC, NULL, "Nucom W-260 (modem)"},     //
1376        {0x2077, 0xa003, "option", 1, 2, 2 | GENERIC, NULL, "Netgear AC327U (modem)"},  //
1377        {0x2077, 0xf000, "option", 0, 0, 2, &modeswitch_std_eject, "ChangHong CH690 (cdrom)"},  //
1378
1379/* Puchuang */
1380        {0x20a6, 0x1000, "option", 0, 0, 2, NULL, "E003 (modem)"},      //
1381        {0x20a6, 0x1105, "option", 2, 0, 2 | GENERIC, NULL, "Intex 3.5G (modem)"},      //
1382        {0x20a6, 0x1106, "option", 2, 0, 2 | GENERIC, NULL, "Haier TE W130 (modem)"},   //
1383        {0x20a6, 0xf00a, "option", 0, 0, 2, &modeswitch_std_eject, "E003 (cdrom)"},     //
1384        {0x20a6, 0xf00e, "option", 0, 0, 2, &modeswitch_std_eject, "Intex 3.5G (cdrom)"},       //
1385
1386/* Tlaytech */
1387        {0x20b9, 0x1682, "option", 0, 0, 2, &modeswitch_std_eject, "TEU800"},   //
1388
1389/* CELOT Corporation */
1390        {0x211f, 0x6801, "option", 2, 0, 2, NULL, "Celot K-3000/CT-650/CT-680 (modem)"},        //
1391
1392/* StrongRising */
1393        {0x21f5, 0x1000, "option", 0, 0, 2, &modeswitch_std_eject, "StrongRising (cdrom)"},     //
1394        {0x21f5, 0x2008, "option", 3, 0, 2 | GENERIC, NULL, "Flash SX0301 (modem)"},    //
1395        {0x21f5, 0x2012, "option", 3, 0, 2 | GENERIC, NULL, "MU290 (modem)"},   //
1396        {0x21f5, 0x3010, "option", 0, 0, 2, &modeswitch_std_eject, "STD808 (cdrom)"},   //
1397
1398/* Linktop */
1399        {0x230d, 0x0001, "option", 0, 1, 0 | ACM, &select_config2, "Linktop LW27x (BSNL 3G)"},  //
1400        {0x230d, 0x0003, "option", 0, 1, 0 | ACM, &select_config2, "Linktop LW27x (Teracom 3G)"},       //
1401        {0x230d, 0x0007, "option", 0, 1, 0 | ACM, &select_config2, "Linktop LW27x (Visiontek 3G)"},     //
1402        {0x230d, 0x000b, "option", 0, 1, 0 | ACM, &select_config2, "Zoom 3G"},  //
1403        {0x230d, 0x000c, "option", 0, 1, 0 | ACM, &select_config2, "Zoom 3G"},  //
1404        {0x230d, 0x000d, "option", 0, 1, 0 | ACM, &select_config2, "Intex Speed 3G v7.2"},      //
1405        {0x230d, 0x0101, "option", 0, 1, 0 | ACM, &select_config2, "Linktop LW27x (BSNL 3G)"},  //
1406        {0x230d, 0x0103, "option", 0, 1, 0 | ACM, &select_config2, "Linktop LW27x (Teracom 3G)"},       //
1407
1408/* TP-Link */
1409        {0x2357, 0x0200, "option", 0, 0, 2, &modeswitch_std_eject, "TP-Link MA180 (cdrom)"},    //
1410        {0x2357, 0x0201, "option", 1, 2, 2 | QMI, NULL, "TP-Link MA180 (modem)"},       //
1411        {0x2357, 0x0202, "option", 1, 2, 2, NULL, "TP-Link MA180 (modem)"},     // also qmi but not yet in driver
1412        {0x2357, 0x0203, "option", 1, 2, 2, NULL, "TP-Link MA180 (modem)"},     //
1413        {0x2357, 0x9000, "option", 1, 2, 2 | QMI, NULL, "TP-Link MA260 (modem)"},       //
1414        {0x2357, 0xf000, "option", 0, 0, 2, &modeswitch_std_eject, "TP-Link MA260 (cdrom)"},    //
1415
1416/* Unknown mfgr */
1417        {0x23a2, 0x1010, "option", 0, 0, 2, &modeswitch_std_eject, "Titan 3.5G (cdrom)"},       //
1418        {0x23a2, 0x1234, "option", 0, 0, 0 | ACM, NULL, "Titan 3.5G"},  //
1419
1420/* Dell */
1421        {0x413c, 0x8114, "option", 1, 0, 2, NULL, "Dell 5700"}, //
1422        {0x413c, 0x8115, "option", 1, 0, 2, NULL, "Dell 5500"}, //
1423        {0x413c, 0x8116, "option", 1, 0, 2, NULL, "Dell 5505"}, //
1424        {0x413c, 0x8117, "option", 1, 0, 2, NULL, "Dell 5700"}, //
1425        {0x413c, 0x8118, "option", 1, 0, 2, NULL, "Dell 5510"}, //
1426        {0x413c, 0x8128, "option", 1, 0, 2, NULL, "Dell 5700"}, //
1427        {0x413c, 0x8129, "option", 1, 0, 2, NULL, "Dell 5700"}, //
1428        {0x413c, 0x8133, "option", 1, 0, 2, NULL, "Dell 5720"}, //
1429        {0x413c, 0x8134, "option", 1, 0, 2, NULL, "Dell 5720"}, //
1430        {0x413c, 0x8135, "option", 1, 0, 2, NULL, "Dell 5720"}, //
1431        {0x413c, 0x8136, "option", 1, 0, 2, NULL, "Dell 5520"}, //
1432        {0x413c, 0x8137, "option", 1, 0, 2, NULL, "Dell 5520"}, //
1433        {0x413c, 0x8138, "option", 1, 0, 2, NULL, "Dell 5520"}, //
1434        {0x413c, 0x8147, "option", 0, 1, 2 | ACM, NULL, "Dell 5530"},   //
1435        {0x413c, 0x8180, "option", 1, 0, 2, NULL, "Dell 5730"}, //
1436        {0x413c, 0x8181, "option", 1, 0, 2, NULL, "Dell 5730"}, //
1437        {0x413c, 0x8182, "option", 1, 0, 2, NULL, "Dell 5730"}, //
1438        {0x413c, 0x8183, "option", 0, 1, 2 | ACM, NULL, "Dell 5530"},   //
1439        {0x413c, 0x8184, "option", 0, 1, 2 | ACM, NULL, "Dell 5540"},   //
1440        {0x413c, 0x8186, "qcserial", 1, 0, 2 | QMI, NULL, "Dell 5620"}, //
1441        {0x413c, 0x818b, "option", 0, 1, 2 | ACM, NULL, "Dell 5541"},   //
1442        {0x413c, 0x818c, "option", 0, 1, 2 | ACM, NULL, "Dell 5542"},   //
1443        {0x413c, 0x818d, "option", 0, 1, 2 | ACM, NULL, "Dell 5550"},   //
1444        {0x413c, 0x818e, "option", 0, 1, 2 | ACM, NULL, "Dell 5560"},   //
1445        {0x413c, 0x8194, "qcserial", 1, 0, 2 | QMI, NULL, "Dell 5630"}, //
1446        {0x413c, 0x8195, "option", 1, 0, 2 | QMI, NULL, "Dell 5800"},   //
1447        {0x413c, 0x8196, "option", 1, 0, 2 | QMI, NULL, "Dell 5800v2"}, //
1448        {0x413c, 0x819b, "option", 1, 0, 2 | QMI, NULL, "Dell 5804"},   //
1449        {0x413c, 0x81a2, "qcserial", 1, 2, 2 | QMI, &select_config1, "Dell 5806"},      //  cdc_mbim in default config2
1450        {0x413c, 0x81a3, "qcserial", 1, 2, 2 | QMI, &select_config1, "Dell 5570"},      //  cdc_mbim in default config2
1451        {0x413c, 0x81a4, "qcserial", 1, 2, 2 | QMI, &select_config1, "Dell 5570e"},     //  cdc_mbim in default config2
1452        {0x413c, 0x81a8, "qcserial", 1, 2, 2 | QMI, NULL, "Dell 5808"}, // also cdc_mbim
1453        {0x413c, 0x81a9, "qcserial", 1, 2, 2 | QMI, NULL, "Dell 5808e"},        // also cdc_mbim
1454        {0x413c, 0x81b1, "qcserial", 1, 2, 2 | QMI, &select_config1, "Dell 5809e"},     //  cdc_mbim in default config2
1455        {0x413c, 0x81b3, "qcserial", 1, 2, 2 | QMI, &select_config1, "Dell 5809e"},     //  cdc_mbim in default config2
1456
1457        {0xffff, 0xffff, NULL, NODEV, NODEV, 0, NULL, NULL}     //
1458};
1459
1460char *get3GDeviceVendor(void)
1461{
1462        char *vendor = "unknown";
1463        int devicecount = 0;
1464        while (devicelist[devicecount].vendor != 0xffff) {
1465                if (scanFor(devicelist[devicecount].vendor, devicelist[devicecount].product)) {
1466                        return devicelist[devicecount].name;
1467
1468                }
1469                devicecount++;
1470        }
1471        return vendor;
1472}
1473
1474char *get3GControlDevice(void)
1475{
1476        static char control[32];
1477        static char data[32];
1478#if defined(ARCH_broadcom) && !defined(HAVE_BCMMODERN)
1479        mkdir("/tmp/usb", 0700);
1480        eval("mount", "-t", "usbfs", "usb", "/tmp/usb");
1481//insmod("sierra");  //further investigation required (compass problem)
1482#endif
1483        int needreset = 1;
1484        char *ttsdevice = "/dev/usb/tts/0";
1485#ifdef HAVE_CAMBRIA
1486        int gpio1, gpio2;
1487        int select = nvram_geti("wan_select");
1488        switch (select) {
1489        case 1:
1490                gpio1 = 1;
1491                gpio2 = 0;
1492                break;
1493        case 2:
1494                gpio1 = 0;
1495                gpio2 = 1;
1496                break;
1497        case 3:
1498                gpio1 = 1;
1499                gpio2 = 1;
1500                break;
1501        default:
1502                gpio1 = 1;
1503                gpio2 = 0;
1504                break;
1505        }
1506
1507        if (gpio1 == nvram_geti("gpio26")
1508            && gpio2 == nvram_geti("gpio27"))
1509                needreset = 0;
1510
1511        if (gpio1) {
1512                nvram_seti("gpio26", 1);
1513                set_gpio(26, 1);
1514        } else {
1515                nvram_seti("gpio26", 0);
1516                set_gpio(26, 0);
1517        }
1518        if (gpio2) {
1519                nvram_seti("gpio27", 1);
1520                set_gpio(27, 1);
1521        } else {
1522                nvram_seti("gpio27", 0);
1523                set_gpio(27, 0);
1524        }
1525#endif
1526#ifdef HAVE_ERC
1527        needreset = 0;
1528#endif
1529        nvram_unset("3gnmvariant");
1530//      nvram_set("3gdata", "/dev/usb/tts/0");  // crap
1531
1532        int devicecount = 0;
1533        while (devicelist[devicecount].vendor != 0xffff) {
1534                if (scanFor(devicelist[devicecount].vendor, devicelist[devicecount].product)) {
1535                        fprintf(stderr, "%s detected\n", devicelist[devicecount].name);
1536
1537#if defined(HAVE_LIBQMI) || defined(HAVE_UQMI)
1538                        if ((devicelist[devicecount].modeswitch & QMI)) {
1539                                insmod("cdc-wdm usbnet qmi_wwan");
1540                                //start custom setup, if defined
1541                                if (devicelist[devicecount].customsetup) {
1542                                        fprintf(stderr, "customsetup QMI\n");
1543                                        devicelist[devicecount].customsetup(needreset, devicecount);
1544                                        sleep(2);
1545                                }
1546                                sprintf(control, "qmi");
1547                                nvram_set("3gdata", "qmi");
1548                                return control;
1549                        }
1550
1551                        if ((devicelist[devicecount].modeswitch & QMIRAW)) {
1552                                insmod("cdc-wdm usbnet qmi_wwan");
1553                                //start custom setup, if defined
1554                                if (devicelist[devicecount].customsetup) {
1555                                        fprintf(stderr, "customsetup QMI RawIP\n");
1556                                        devicelist[devicecount].customsetup(needreset, devicecount);
1557                                        sleep(2);
1558                                }
1559                                sprintf(control, "qmiraw");
1560                                nvram_set("3gdata", "qmiraw");
1561                                return control;
1562                        }
1563#endif
1564                        if (devicelist[devicecount].driver) {
1565                                insmod("usbserial usb_wwan cdc-wdm usbnet qmi_wwan");
1566                                insmod(devicelist[devicecount].driver);
1567                        }
1568                        if (devicelist[devicecount].datadevice != NODEV) {
1569                                if (devicelist[devicecount].datadevice == HSO)
1570                                        sprintf(data, "hso");
1571                                else {
1572                                        if ((devicelist[devicecount].modeswitch & ACM)) {
1573                                                insmod("cdc-acm");
1574                                                sprintf(data, "/dev/ttyACM%d", devicelist[devicecount].datadevice);
1575                                        } else if ((devicelist[devicecount].modeswitch & GENERIC)) {
1576                                                sysprintf("echo %04x %04x > /sys/bus/usb-serial/drivers/option1/new_id", devicelist[devicecount].vendor, devicelist[devicecount].product);
1577                                                insmod("usb_wwan cdc-wdm usbnet qmi_wwan");
1578                                                sprintf(data, "/dev/usb/tts/%d", devicelist[devicecount].datadevice);
1579                                        } else
1580                                                sprintf(data, "/dev/usb/tts/%d", devicelist[devicecount].datadevice);
1581
1582                                }
1583                                nvram_set("3gdata", data);
1584                        }
1585                        if (devicelist[devicecount].modeswitch & 0x0f) {
1586                                char variant[32];
1587                                sprintf(variant, "%d", devicelist[devicecount].modeswitch & 0x0f);
1588                                nvram_set("3gnmvariant", variant);
1589                        }
1590                        //start custom setup, if defined
1591                        if (devicelist[devicecount].customsetup) {
1592                                fprintf(stderr, "customsetup\n");
1593                                devicelist[devicecount].customsetup(needreset, devicecount);
1594                                sleep(2);
1595                        }
1596                        if (devicelist[devicecount].controldevice == HSO) {
1597                                insmod("hso");
1598                                sprintf(control, "hso");
1599                                nvram_set("3gdata", "hso");
1600                                FILE *out = fopen("/tmp/conninfo.ini", "wb");
1601                                fprintf(out, "APN=%s\n", nvram_safe_get("wan_apn"));
1602                                fprintf(out, "USER=%s\n", nvram_safe_get("ppp_username"));
1603                                fprintf(out, "PASS=%s\n", nvram_safe_get("ppp_passwd"));
1604                                fprintf(out, "PIN=%s\n", nvram_safe_get("wan_pin"));
1605                                fclose(out);
1606                                eval("/etc/hso/hso_connect.sh", "restart");
1607                        } else if ((devicelist[devicecount].modeswitch & ACM)) {
1608                                insmod("cdc-acm");
1609                                sprintf(control, "/dev/ttyACM%d", devicelist[devicecount].controldevice);
1610                                eval("comgt", "-d", control, "-s", "/etc/comgt/wakeup.comgt");
1611                        } else if ((devicelist[devicecount].modeswitch & GENERIC)) {
1612                                sysprintf("echo %04x %04x > /sys/bus/usb-serial/drivers/option1/new_id", devicelist[devicecount].vendor, devicelist[devicecount].product);
1613                                insmod("usb_wwan cdc-wdm usbnet qmi_wwan");
1614                                sprintf(control, "/dev/usb/tts/%d", devicelist[devicecount].controldevice);
1615                                eval("comgt", "-d", control, "-s", "/etc/comgt/wakeup.comgt");
1616                        } else
1617                                sprintf(control, "/dev/usb/tts/%d", devicelist[devicecount].controldevice);
1618                        eval("comgt", "-d", control, "-s", "/etc/comgt/wakeup.comgt");
1619                        return control;
1620                }
1621                devicecount++;
1622        }
1623        //not found, use generic implementation (all drivers)
1624        insmod("cdc-acm cdc-wdm usbnet qmi_wwan usbserial usb_wwan sierra option qcserial");
1625        return ttsdevice;
1626}
1627
1628/*
1629//future
1630typedef struct {
1631char *devicename;
1632int vendorid;
1633int productid;
1634char *drivers;
1635char *3gdata;
1636char *controldevice;
1637int iconswitch;
1638}3GDEVICE;
1639*/
Note: See TracBrowser for help on using the repository browser.