]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
qmi_wwan: unconditionally reject 2 ep interfaces
authorBjørn Mork <bjorn@mork.no>
Sat, 8 Feb 2020 15:55:04 +0000 (16:55 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 7 Apr 2020 08:50:53 +0000 (10:50 +0200)
commitbe38d754764f23ef326f3fefc19a5cc3eca41113
tree688a1bce3fad0efaa6c2af9bc6deb01e8e9ed50c
parent4ecaffa492ea3675d4bff28671624941dd0b09ef
qmi_wwan: unconditionally reject 2 ep interfaces

BugLink: https://bugs.launchpad.net/bugs/1868623
[ Upstream commit 00516d13d4cfa56ce39da144db2dbf08b09b9357 ]

We have been using the fact that the QMI and DIAG functions
usually are the only ones with class/subclass/protocol being
ff/ff/ff on Quectel modems. This has allowed us to match the
QMI function without knowing the exact interface number,
which can vary depending on firmware configuration.

The ability to silently reject the DIAG function, which is
usually handled by the option driver, is important for this
method to work.  This is done based on the knowledge that it
has exactly 2 bulk endpoints.  QMI function control interfaces
will have either 3 or 1 endpoint. This rule is universal so
the quirk condition can be removed.

The fixed layouts known from the Gobi1k and Gobi2k modems
have been gradually replaced by more dynamic layouts, and
many vendors now use configurable layouts without changing
device IDs.  Renaming the class/subclass/protocol matching
macro makes it more obvious that this is now not Quectel
specific anymore.

Cc: Kristian Evensen <kristian.evensen@gmail.com>
Cc: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/usb/qmi_wwan.c