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

Last change on this file since 31811 was 31811, checked in by brainslayer, 3 weeks ago

erc changes

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