NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
misc/49233: add huwaei E353 to usbdevs
>Number: 49233
>Category: misc
>Synopsis: add huwaei E353 to usbdevs
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Sep 23 23:50:00 +0000 2014
>Originator: Ben Gergely
>Release: current
>Organization:
>Environment:
NetBSD 7.99.1
>Description:
adding Huwaei E353 3G dongle to usbdevs
>How-To-Repeat:
>Fix:
? E353.patch
Index: u3g.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/u3g.c,v
retrieving revision 1.30
diff -u -r1.30 u3g.c
--- u3g.c 2 Sep 2013 07:39:03 -0000 1.30
+++ u3g.c 23 Sep 2014 23:31:54 -0000
@@ -192,6 +192,7 @@
{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_K3765 },
{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_MOBILE },
{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E171 },
+ { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E353 },
/* OEM: Merlin */
{ USB_VENDOR_MERLIN, USB_PRODUCT_MERLIN_V620 },
/* OEM: Novatel */
@@ -464,7 +465,6 @@
return send_bulkmsg(dev, cmd, sizeof(cmd));
}
-
static int
u3g_huawei_e171_reinit(usbd_device_handle dev)
{
@@ -485,6 +485,28 @@
}
static int
+u3g_huawei_e353_reinit(usbd_device_handle dev)
+{
+ unsigned char cmd[31];
+
+ /* magic string adapted from some webpage */
+ memset(cmd, 0, sizeof(cmd));
+ cmd[0] = 0x55;
+ cmd[1] = 0x53;
+ cmd[2] = 0x42;
+ cmd[3] = 0x43;
+ cmd[4] = 0x7f;
+ cmd[9] = 0x02;
+ cmd[12] = 0x80;
+ cmd[14] = 0x0a;
+ cmd[15] = 0x11;
+ cmd[16] = 0x06;
+ cmd[17] = 0x20;
+ cmd[23] = 0x01;
+ return send_bulkmsg(dev, cmd, sizeof(cmd));
+}
+
+static int
u3g_sierra_reinit(usbd_device_handle dev)
{
/* Some Sierra devices presents themselves as a umass device with
@@ -545,6 +567,9 @@
case USB_PRODUCT_HUAWEI_E171INIT:
return u3g_huawei_e171_reinit(uaa->device);
break;
+ case USB_PRODUCT_HUAWEI_E353INIT:
+ return u3g_huawei_e353_reinit(uaa->device);
+ break;
default:
return u3g_huawei_reinit(uaa->device);
break;
Index: usbdevs
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/usbdevs,v
retrieving revision 1.680
diff -u -r1.680 usbdevs
--- usbdevs 4 Aug 2014 19:59:37 -0000 1.680
+++ usbdevs 23 Sep 2014 23:32:08 -0000
@@ -1733,6 +1733,7 @@
product HUAWEI E1820 0x14ac Huawei E1820
product HUAWEI E171INIT 0x14fe Huawei E171 USB CD
product HUAWEI E171 0x1506 Huawei E171
+product HUAWEI E353 0x1f01 Huawei E353
product HUAWEI K3765INIT 0x1520 Huawei K3765 USB CD
/* Huawei-3Com products */
Index: usbdevs.h
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/usbdevs.h,v
retrieving revision 1.672
diff -u -r1.672 usbdevs.h
--- usbdevs.h 4 Aug 2014 20:01:12 -0000 1.672
+++ usbdevs.h 23 Sep 2014 23:32:29 -0000
@@ -1740,6 +1740,8 @@
#define USB_PRODUCT_HUAWEI_E1820 0x14ac /* Huawei E1820 */
#define USB_PRODUCT_HUAWEI_E171INIT 0x14fe /* Huawei E171 USB CD */
#define USB_PRODUCT_HUAWEI_E171 0x1506 /* Huawei E171 */
+#define USB_PRODUCT_HUAWEI_E353INIT 0x1f01 /* Huawei E353 USB CD */
+#define USB_PRODUCT_HUAWEI_E353 0x1507 /* Huawei E353 */
#define USB_PRODUCT_HUAWEI_K3765INIT 0x1520 /* Huawei K3765
USB CD */
/* Huawei-3Com products */
Index: usbdevs_data.h
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/usbdevs_data.h,v
retrieving revision 1.673
diff -u -r1.673 usbdevs_data.h
--- usbdevs_data.h 4 Aug 2014 20:01:12 -0000 1.673
+++ usbdevs_data.h 23 Sep 2014 23:32:40 -0000
@@ -5459,6 +5459,10 @@
"Huawei E171",
},
{
+ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E353,
+ "Huawei E353",
+ },
+ {
USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_K3765INIT,
"Huawei K3765 USB CD",
},
@@ -10183,4 +10187,4 @@
"Prestige",
},
};
-const int usb_nproducts = 2005;
+const int usb_nproducts = 2006;
Home |
Main Index |
Thread Index |
Old Index