OSDN Git Service

qmi_wwan: do not steal interfaces from class drivers
authorBjørn Mork <bjorn@mork.no>
Wed, 2 May 2018 20:22:54 +0000 (22:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 May 2018 06:48:47 +0000 (08:48 +0200)
commit10bffef7fb2614f17319198146feee1769270f1e
tree749b0589ffa0c89aee3c443feadf0ca92fe43205
parent02ce46ba5c009d926c7a07fb9f79d39d7aa89fbc
qmi_wwan: do not steal interfaces from class drivers

[ Upstream commit 5697db4a696c41601a1d15c1922150b4dbf5726c ]

The USB_DEVICE_INTERFACE_NUMBER matching macro assumes that
the { vendorid, productid, interfacenumber } set uniquely
identifies one specific function.  This has proven to fail
for some configurable devices. One example is the Quectel
EM06/EP06 where the same interface number can be either
QMI or MBIM, without the device ID changing either.

Fix by requiring the vendor-specific class for interface number
based matching.  Functions of other classes can and should use
class based matching instead.

Fixes: 03304bcb5ec4 ("net: qmi_wwan: use fixed interface number matching")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/qmi_wwan.c