Repository navigation
net80211: report scan done when a foreground scan is interrupted - #389
Merged
Merged
Conversation
scan_done() skipped the scan done event whenever outgoing traffic interrupted a scan before it covered every channel. That only makes sense for background scans, which net80211 resumes later. A foreground scan, such as one requested by wpa_supplicant while associated, is never resumed, so the requester waited forever. With wpa_supplicant this left the scan radio work open and every later "wpa_cli scan" returned FAIL-BUSY until wpa_supplicant was restarted. Seen on rtwn(4) with an RTL8821AU: the scan was paused on its first of nine channels and no RTM_IEEE80211_SCAN was sent. Send the event unless the interrupted scan is a background scan.
|
Thank you for taking the time to contribute to FreeBSD!
Please review CONTRIBUTING.md, then update and push your branch again. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates scan completion handling so traffic-interrupted foreground scans send the scan-done event immediately, preventing requesters such as wpa_supplicant from waiting indefinitely, while retaining resumable behavior for background scans. Sequence diagram for traffic-interrupted scan completionsequenceDiagram
participant Requester as wpa_supplicant
participant Scanner as net80211_scan_sw
participant VAP as ieee80211_vap
Requester->>Scanner: scan request
Scanner->>Scanner: scan_done(scandone)
alt traffic interrupt and foreground scan
Scanner->>VAP: ieee80211_notify_scan_done(vap)
VAP-->>Requester: RTM_IEEE80211_SCAN
else traffic interrupt and background scan
Scanner->>Scanner: retain interrupted scan for resume
else scan reaches final channel
Scanner->>VAP: ieee80211_notify_scan_done(vap)
VAP-->>Requester: RTM_IEEE80211_SCAN
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
scan_done() skipped the scan done event whenever outgoing traffic interrupted a scan before it covered every channel. That only makes sense for background scans, which net80211 resumes later. A foreground scan, such as one requested by wpa_supplicant while associated, is never resumed, so the requester waited forever.
With wpa_supplicant this left the scan radio work open and every later "wpa_cli scan" returned FAIL-BUSY until wpa_supplicant was restarted. Seen on rtwn(4) with an RTL8821AU: the scan was paused on its first of nine channels and no RTM_IEEE80211_SCAN was sent.
Send the event unless the interrupted scan is a background scan.
Summary by Sourcery
Bug Fixes: