Ticket #12051: modeswitch.2.patch

File modeswitch.2.patch, 1.6 KB (added by haiqu, 10 years ago)

Add Huawei devices

  • src/add-ons/kernel/drivers/common/usb_modeswitch.cpp

    diff --git a/src/add-ons/kernel/drivers/common/usb_modeswitch.cpp b/src/add-ons/kernel/drivers/common/usb_modeswitch.cpp
    index f1e3c85..be4498c 100644
    a b enum msgType {  
    3636    MSG_HUAWEI_1 = 0,
    3737    MSG_HUAWEI_2,
    3838    MSG_HUAWEI_3,
     39    MSG_HUAWEI_4,
    3940    MSG_NOKIA_1,
    4041    MSG_OLIVETTI_1,
    4142    MSG_OLIVETTI_2,
    unsigned char kDevicesMsg[][31] = {  
    6768        0x06, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
    6869        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
    6970    },
     71    {   /* MSG_HUAWEI_4 */
     72
     73        0x55, 0x53, 0x42, 0x43, 0x12, 0x34, 0x56, 0x78,
     74        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x11,
     75        0x06, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
     76        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
     77    },
    7078    {   /* MSG_NOKIA_1 */
    7179        0x55, 0x53, 0x42, 0x43, 0x12, 0x34, 0x56, 0x78,
    7280        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x1b,
    unsigned char kDevicesMsg[][31] = {  
    122130#define NOKIA_VENDOR    0x0421
    123131#define NOVATEL_VENDOR  0x1410
    124132#define ZYDAS_VENDOR    0x0ace
    125 #define ZTE_VENDOR  0x19d2
     133#define ZTE_VENDOR      0x19d2
    126134#define OLIVETTI_VENDOR 0x0b3c
    127135#define OPTION_VENDOR   0x0af0
    128136#define ATHEROS_VENDOR  0x0cf3
    static const struct {  
    160168    {{ 0, 0, 0, HUAWEI_VENDOR, 0x1030}, MSG_HUAWEI_2},
    161169    {{ 0, 0, 0, HUAWEI_VENDOR, 0x1031}, MSG_HUAWEI_2},
    162170    {{ 0, 0, 0, HUAWEI_VENDOR, 0x1f01}, MSG_HUAWEI_3},
     171    {{ 0, 0, 0, HUAWEI_VENDOR, 0x1f02}, MSG_HUAWEI_3},
     172    {{ 0, 0, 0, HUAWEI_VENDOR, 0x1f03}, MSG_HUAWEI_4},
    163173    {{ 0, 0, 0, NOKIA_VENDOR, 0x060c}, MSG_NOKIA_1},
    164174    {{ 0, 0, 0, NOKIA_VENDOR, 0x0610}, MSG_NOKIA_1},
    165175    {{ 0, 0, 0, NOKIA_VENDOR, 0x061d}, MSG_NOKIA_1},