bugfix: events: stop processing scan results when aborting#136
Open
fvb-verhaert wants to merge 1 commit into
Open
bugfix: events: stop processing scan results when aborting#136fvb-verhaert wants to merge 1 commit into
fvb-verhaert wants to merge 1 commit into
Conversation
Signed-off-by: Frederik Van Bogaert <frederik.vanbogaert@mind.be>
krish2718
requested changes
May 13, 2026
krish2718
left a comment
Collaborator
There was a problem hiding this comment.
Please add commit log with details of the issue and how/why the fix helps. And also submit this fix to the hostap mailing list, once its merged then it can be cherry-picked to Zephyr as fromtree
There was a problem hiding this comment.
Pull request overview
This PR prevents scan result processing from continuing when a scan has been reported as aborted, avoiding a timing-dependent infinite loop/deadlock observed when disconnecting during a failed connection attempt (e.g., connecting to a nonexistent SSID and then issuing wifi disconnect).
Changes:
- Treat aborted scans (
data->scan_info.aborted) likeupdate_onlyscans by short-circuiting scan result processing. - Ensure scan work is still completed and scan results are freed via the existing
scan_work_donepath.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
In our testing of the Wi-Fi stack, we came across a scenario where when attempting to connect to a non-existing Wi-Fi network and then calling wifi disconnect, the stack gets stuck in an infinite loop where it's continually trying to process the same scan results without end.
This one-line fix prevents that loop from happening by exiting the scan parsing early if we are aborting.
Steps to reproduce the original issue:
Note that this does not always reproduce the issue, it's somewhat timing dependent
Platform: NXP RW610