]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 May 2018 15:25:03 +0000 (11:25 -0400)
commitae1ef9eef6e52d555333887f137be8ebc7b6af2b
treef58aa094cab9ff7f5bdffd72d4a3ff09ce6a73ce
parent63af6e49ae190e264991966557d84fe01528451c
qmi_wwan: do not steal interfaces from class drivers

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: 09b0fcefc4be ("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>
drivers/net/usb/qmi_wwan.c