Change the forced interface 4 whitelist to use the generic shared
binder instead of the Gobi specific one. Certain ZTE devices
(K3520-Z & K3765-Z) don't work with the Gobi version, but function
quite happily with the generic. This has been tested with the following
devices:
K3520-Z
K3565-Z
K3765-Z
K4505-Z
It hasn't been tested with the ZTE MF820D, which is the only other
device that uses this whitelist at present. Although Bjorn doesn't
expect any problems, any testing with that device would be appreciated.
Signed-off-by: Andrew Bird <[email protected]>
---
drivers/net/usb/qmi_wwan.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index d316503b..62a1a43 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -357,9 +357,9 @@ static const struct driver_info qmi_wwan_gobi = {
/* ZTE suck at making USB descriptors */
static const struct driver_info qmi_wwan_force_int4 = {
- .description = "Qualcomm Gobi wwan/QMI device",
+ .description = "Qualcomm WWAN/QMI device",
.flags = FLAG_WWAN,
- .bind = qmi_wwan_bind_gobi,
+ .bind = qmi_wwan_bind_shared,
.unbind = qmi_wwan_unbind_shared,
.manage_power = qmi_wwan_manage_power,
.data = BIT(4), /* interface whitelist bitmap */
--
1.7.5.4
Add the ZTE (Vodafone) K3765-Z to the whitelist. This requires the
previous patch to make the whitelist with forced interface 4 generic
or the device fails to initialise. After applying this patch and
loading the Option driver without usb-modeswitch's bind all
interfaces trick, a wwan0 net interface and /dev/cdc-wdm0 device
file were created. Using Bjorn Mork's perl connection script a
connection was made to a mobile network using QMI and the network
interface's IPv4 address was configured OK.
Signed-off-by: Andrew Bird <[email protected]>
---
drivers/net/usb/qmi_wwan.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 62a1a43..0646e45 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -457,6 +457,15 @@ static const struct usb_device_id products[] = {
.bInterfaceProtocol = 0xff,
.driver_info = (unsigned long)&qmi_wwan_force_int4,
},
+ { /* ZTE (Vodafone) K3765-Z */
+ .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x19d2,
+ .idProduct = 0x2002,
+ .bInterfaceClass = 0xff,
+ .bInterfaceSubClass = 0xff,
+ .bInterfaceProtocol = 0xff,
+ .driver_info = (unsigned long)&qmi_wwan_force_int4,
+ },
{ /* ZTE (Vodafone) K4505-Z */
.match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
.idVendor = 0x19d2,
--
1.7.5.4
Signed-off-by: Andrew Bird <[email protected]>
---
drivers/net/usb/qmi_wwan.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 0646e45..f64dac3 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -356,6 +356,15 @@ static const struct driver_info qmi_wwan_gobi = {
};
/* ZTE suck at making USB descriptors */
+static const struct driver_info qmi_wwan_force_int1 = {
+ .description = "Qualcomm WWAN/QMI device",
+ .flags = FLAG_WWAN,
+ .bind = qmi_wwan_bind_shared,
+ .unbind = qmi_wwan_unbind_shared,
+ .manage_power = qmi_wwan_manage_power,
+ .data = BIT(1), /* interface whitelist bitmap */
+};
+
static const struct driver_info qmi_wwan_force_int4 = {
.description = "Qualcomm WWAN/QMI device",
.flags = FLAG_WWAN,
@@ -430,6 +439,15 @@ static const struct usb_device_id products[] = {
.bInterfaceProtocol = 0xff,
.driver_info = (unsigned long)&qmi_wwan_force_int4,
},
+ { /* ZTE (Vodafone) K3520-Z */
+ .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x19d2,
+ .idProduct = 0x0055,
+ .bInterfaceClass = 0xff,
+ .bInterfaceSubClass = 0xff,
+ .bInterfaceProtocol = 0xff,
+ .driver_info = (unsigned long)&qmi_wwan_force_int1,
+ },
{ /* ZTE (Vodafone) K3565-Z */
.match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
.idVendor = 0x19d2,
--
1.7.5.4
Andrew Bird <[email protected]> writes:
> Change the forced interface 4 whitelist to use the generic shared
> binder instead of the Gobi specific one. Certain ZTE devices
> (K3520-Z & K3765-Z) don't work with the Gobi version, but function
> quite happily with the generic. This has been tested with the following
> devices:
> K3520-Z
> K3565-Z
> K3765-Z
> K4505-Z
> It hasn't been tested with the ZTE MF820D, which is the only other
> device that uses this whitelist at present. Although Bjorn doesn't
> expect any problems, any testing with that device would be appreciated.
>
> Signed-off-by: Andrew Bird <[email protected]>
> ---
> drivers/net/usb/qmi_wwan.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
> index d316503b..62a1a43 100644
> --- a/drivers/net/usb/qmi_wwan.c
> +++ b/drivers/net/usb/qmi_wwan.c
> @@ -357,9 +357,9 @@ static const struct driver_info qmi_wwan_gobi = {
>
> /* ZTE suck at making USB descriptors */
> static const struct driver_info qmi_wwan_force_int4 = {
> - .description = "Qualcomm Gobi wwan/QMI device",
> + .description = "Qualcomm WWAN/QMI device",
> .flags = FLAG_WWAN,
> - .bind = qmi_wwan_bind_gobi,
> + .bind = qmi_wwan_bind_shared,
> .unbind = qmi_wwan_unbind_shared,
> .manage_power = qmi_wwan_manage_power,
> .data = BIT(4), /* interface whitelist bitmap */
Acked-by: Bjørn Mork <[email protected]>
This fixes a logical error in the code. Minidriver constructs with an
interface whitelist should not use qmi_wwan_bind_gobi. It was made to
prevent binding to the serial interfaces on Gobi devices, and serves no
useful purpose when used with a whitelist. The change is a no-op for
the ZTE MF820D, but is important for new devices.
Thanks for fixing this.
Bjør
Andrew Bird <[email protected]> writes:
> Add the ZTE (Vodafone) K3765-Z to the whitelist.
Acked-by: Bjørn Mork <[email protected]>
Andrew Bird <[email protected]> writes:
> Signed-off-by: Andrew Bird <[email protected]>
Acked-by: Bjørn Mork <[email protected]>
> /* ZTE suck at making USB descriptors */
> +static const struct driver_info qmi_wwan_force_int1 = {
> + .description = "Qualcomm WWAN/QMI device",
> + .flags = FLAG_WWAN,
> + .bind = qmi_wwan_bind_shared,
> + .unbind = qmi_wwan_unbind_shared,
> + .manage_power = qmi_wwan_manage_power,
> + .data = BIT(1), /* interface whitelist bitmap */
> +};
> +
> static const struct driver_info qmi_wwan_force_int4 = {
> .description = "Qualcomm WWAN/QMI device",
> .flags = FLAG_WWAN,
> @@ -430,6 +439,15 @@ static const struct usb_device_id products[] = {
> .bInterfaceProtocol = 0xff,
> .driver_info = (unsigned long)&qmi_wwan_force_int4,
> },
> + { /* ZTE (Vodafone) K3520-Z */
> + .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
> + .idVendor = 0x19d2,
> + .idProduct = 0x0055,
> + .bInterfaceClass = 0xff,
> + .bInterfaceSubClass = 0xff,
> + .bInterfaceProtocol = 0xff,
> + .driver_info = (unsigned long)&qmi_wwan_force_int1,
> + },
> { /* ZTE (Vodafone) K3565-Z */
> .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
> .idVendor = 0x19d2,
Looking forward to changing all this to a single line device + interface
number macro in 3.6 :-)
Bjørn
From: Andrew Bird <[email protected]>
Date: Sun, 20 May 2012 09:28:36 +0100
> Change the forced interface 4 whitelist to use the generic shared
> binder instead of the Gobi specific one. Certain ZTE devices
> (K3520-Z & K3765-Z) don't work with the Gobi version, but function
> quite happily with the generic. This has been tested with the following
> devices:
> K3520-Z
> K3565-Z
> K3765-Z
> K4505-Z
> It hasn't been tested with the ZTE MF820D, which is the only other
> device that uses this whitelist at present. Although Bjorn doesn't
> expect any problems, any testing with that device would be appreciated.
>
> Signed-off-by: Andrew Bird <[email protected]>
Applied to net-next.
From: Andrew Bird <[email protected]>
Date: Sun, 20 May 2012 09:28:37 +0100
> Add the ZTE (Vodafone) K3765-Z to the whitelist. This requires the
> previous patch to make the whitelist with forced interface 4 generic
> or the device fails to initialise. After applying this patch and
> loading the Option driver without usb-modeswitch's bind all
> interfaces trick, a wwan0 net interface and /dev/cdc-wdm0 device
> file were created. Using Bjorn Mork's perl connection script a
> connection was made to a mobile network using QMI and the network
> interface's IPv4 address was configured OK.
>
> Signed-off-by: Andrew Bird <[email protected]>
Applied to net-next.
From: Andrew Bird <[email protected]>
Date: Sun, 20 May 2012 09:28:37 +0100
> Add the ZTE (Vodafone) K3765-Z to the whitelist. This requires the
> previous patch to make the whitelist with forced interface 4 generic
> or the device fails to initialise. After applying this patch and
> loading the Option driver without usb-modeswitch's bind all
> interfaces trick, a wwan0 net interface and /dev/cdc-wdm0 device
> file were created. Using Bjorn Mork's perl connection script a
> connection was made to a mobile network using QMI and the network
> interface's IPv4 address was configured OK.
>
> Signed-off-by: Andrew Bird <[email protected]>
Applied to net-next.