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

Skip to content
Commit 4d525cbe authored by Mike Kasick's avatar Mike Kasick
Browse files

Keep track of tetherable USB interfaces in both up and down link states.

USB network interfaces that are present-since-boot are never issued "added"
(or "removed", for that matter) notifications from netd, and thus, are only
discovered by Tethering when their link state changes.  Prior to this
commit, such interfaces were only tracked on change to "up" link state,
even though the interfaces were _not_ removed on changes to "down" state.

On some devices (e.g., epicmtd) a change to "up" state only occurs after
(i) IFF_UP is set on the interface, (ii) the rndis USB gadget function is
enabled, and (iii) a USB cable is connected to another machine.  Since
rndis is enabled immediately before the start of USB tethering, the "up"
state is achieved asynchronously, and often _after_ Tethering looks for a
tetherable interface.  However, "down" state is synchronously reported when
IFF_UP is set, and thus, serves as an effective mechanism to notify
Tethering about the existence of the interface.
parent f8a78d0a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment