* [PATCH] net: qmi_wwan: support Sierra Wireless MC77xx devices in QMI mode
@ 2012-04-17 19:38 Bjørn Mork
2012-04-19 19:33 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Bjørn Mork @ 2012-04-17 19:38 UTC (permalink / raw)
To: netdev; +Cc: Bjørn Mork
The MC77xx devices can operate in two modes: "Direct IP" or "QMI",
switchable using a password protected AT command. Both product ID
and USB interface configuration will change when switched.
The "sierra_net" driver supports the "Direct IP" mode. This driver
supports the "QMI" mode.
There are also multiple possible USB interface configurations in each
mode, some providing more than one wwan interface. Like many other
devices made for Windows, different interface types are identified
using a static interface number. We define a Sierra specific
interface whitelist to support this.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
drivers/net/usb/qmi_wwan.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 0fcc075..8ffc733 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -486,6 +486,27 @@ static const struct driver_info qmi_wwan_force_int4 = {
.data = BIT(4), /* interface whitelist bitmap */
};
+/* Sierra Wireless provide equally useless interface descriptors
+ * Devices in QMI mode can be switched between two different
+ * configurations:
+ * a) USB interface #8 is QMI/wwan
+ * b) USB interfaces #8, #19 and #20 are QMI/wwan
+ *
+ * Both configurations provide a number of other interfaces (serial++),
+ * some of which have the same endpoint configuration as we expect, so
+ * a whitelist or blacklist is necessary.
+ *
+ * FIXME: The below whitelist should include BIT(20). It does not
+ * because I cannot get it to work...
+ */
+static const struct driver_info qmi_wwan_sierra = {
+ .description = "Sierra Wireless wwan/QMI device",
+ .flags = FLAG_WWAN,
+ .bind = qmi_wwan_bind_gobi,
+ .unbind = qmi_wwan_unbind_shared,
+ .manage_power = qmi_wwan_manage_power,
+ .data = BIT(8) | BIT(19), /* interface whitelist bitmap */
+};
#define HUAWEI_VENDOR_ID 0x12D1
#define QMI_GOBI_DEVICE(vend, prod) \
@@ -566,6 +587,15 @@ static const struct usb_device_id products[] = {
.bInterfaceProtocol = 0xff,
.driver_info = (unsigned long)&qmi_wwan_force_int4,
},
+ { /* Sierra Wireless MC77xx in QMI mode */
+ .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x1199,
+ .idProduct = 0x68a2,
+ .bInterfaceClass = 0xff,
+ .bInterfaceSubClass = 0xff,
+ .bInterfaceProtocol = 0xff,
+ .driver_info = (unsigned long)&qmi_wwan_sierra,
+ },
{QMI_GOBI_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
{QMI_GOBI_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */
{QMI_GOBI_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: qmi_wwan: support Sierra Wireless MC77xx devices in QMI mode
2012-04-17 19:38 [PATCH] net: qmi_wwan: support Sierra Wireless MC77xx devices in QMI mode Bjørn Mork
@ 2012-04-19 19:33 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-04-19 19:33 UTC (permalink / raw)
To: bjorn; +Cc: netdev
From: Bjørn Mork <bjorn@mork.no>
Date: Tue, 17 Apr 2012 21:38:23 +0200
> The MC77xx devices can operate in two modes: "Direct IP" or "QMI",
> switchable using a password protected AT command. Both product ID
> and USB interface configuration will change when switched.
>
> The "sierra_net" driver supports the "Direct IP" mode. This driver
> supports the "QMI" mode.
>
> There are also multiple possible USB interface configurations in each
> mode, some providing more than one wwan interface. Like many other
> devices made for Windows, different interface types are identified
> using a static interface number. We define a Sierra specific
> interface whitelist to support this.
>
> Signed-off-by: Bjørn Mork <bjorn@mork.no>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-19 19:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-17 19:38 [PATCH] net: qmi_wwan: support Sierra Wireless MC77xx devices in QMI mode Bjørn Mork
2012-04-19 19:33 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).