Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6df7993 authored by Tomasz Michalec's avatar Tomasz Michalec
Browse files

fastboot: Add support for alternate interface

Problem: Within a configuration, an interface can have "alternate
settings". In this alternate interfaces can be a valid fastboot
interface. We currently only look at the default interface which leads
to not detecting device properly.

Solution: When inspecting a device, also look at the alternative
interface.

Details: bNumInterfaces field from USB configuration descriptor tells
about number of interfaces not about number of interface descriptors
within that configuration. It is important to parse all interface
descriptors within configuration's wTotalLength, because one interface
may have multiple alternate settings. If we found matching fastboot
interface which is alternate setting, then we have to switch interface
to that setting to be able to use it.

Bug: 370465224
Change-Id: I5551c71919e0046f943750a56ce6a89579008461
parent e8e260f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment