Ticket #5779: lib3g.c

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