]> git.baikalelectronics.ru Git - kernel.git/commit
net: lan78xx: replace bogus endpoint lookup
authorJohan Hovold <johan@kernel.org>
Tue, 28 Jul 2020 12:10:31 +0000 (14:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Jul 2020 20:35:44 +0000 (13:35 -0700)
commitbd953de60a7358accc47b94e6447816174d44458
tree68e515a78cf5772c43dd826c5b74fdc7b957d1ef
parent5f3836762c57b1f8bf5d0607d2eaffd6bfa82f8a
net: lan78xx: replace bogus endpoint lookup

Drop the bogus endpoint-lookup helper which could end up accepting
interfaces based on endpoints belonging to unrelated altsettings.

Note that the returned bulk pipes and interrupt endpoint descriptor
were never actually used. Instead the bulk-endpoint numbers are
hardcoded to 1 and 2 (matching the specification), while the interrupt-
endpoint descriptor was assumed to be the third descriptor created by
USB core.

Try to bring some order to this by dropping the bogus lookup helper and
adding the missing endpoint sanity checks while keeping the interrupt-
descriptor assumption for now.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/lan78xx.c