Repository navigation
backend: borrow an existing idle AP interface - #20
Open
professorpip wants to merge 1 commit into
Open
professorpip wants to merge 1 commit into
professorpip wants to merge 1 commit into
Conversation
Signed-off-by: Philip White <60242898+professorpip@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Some Android Wi-Fi frameworks leave a valid, idle
ap0in place, while their vendor driver refuses to create an equivalent replacement.On the tested MediaTek device:
ap0, direct nl80211 creation failed with-EFAULT;ap0;-ENOMEM.The errno values are the vendor driver's interface-operation response, not evidence of host memory exhaustion.
Change
When
ap0already exists, the backend now borrows it only when both runtime checks pass:NL80211_IFTYPE_AP;An active interface, a different interface type or an inspection failure is refused rather than replaced. A durable marker records that Android owns the interface. Stop then detaches it from the bridge, flushes VirtualAP addresses and brings it down, but does not delete it.
When
ap0does not exist, the existing create/delete behaviour is unchanged.Working output
The same interface index was present before start, during the managed router run and after repeated Stop calls.
Tested environment
mtk_cfg80211_*path observed)ccmni0Two complete saved-profile start/stop cycles passed, including an extra idempotent Stop in each cycle. Android Wi-Fi remained healthy and the framework-owned interface retained the same index.
Validation
make checksuite passed on the host validation runner.The macOS checkout cannot run
make checkdirectly because the suite requires Linux kernel headers and Linux-only APIs. The pushed branch is left for the repository's Linux CI to re-run those checks.