-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Bluetooth: BAP: SD: Fix issues with pa sync requests #101130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes issues with PA (Periodic Advertising) sync request handling in the Bluetooth BAP scan delegator by introducing a local boolean flag to track sync requests independently of the PA sync state. This addresses a gap where the syncing state was not properly tracked, leading to incorrect behavior when handling PA sync termination requests.
Key Changes:
- Added
pa_sync_requestedboolean flag to track whether a PA sync has been requested, independent of the actual sync state - Refactored mutex handling to be more robust when callback operations fail
- Consolidated receive state cleanup logic into a reusable
free_recv_state()function
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aefcb29 to
e4edc6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e4edc6c to
fda0d1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fda0d1e to
929d194
Compare
929d194 to
e3ed134
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The implementation only used the receive state's PA sync state to determine whether to call the PA sync req or PA sync term req, but that state does not include the syncing state. Rather than using the receive state's PA sync state, we add a local boolean to keep track of whether the PA sync was requested, so if we receive a mod_src with PA sync == BT_BAP_BASS_PA_REQ_NO_SYNC then we request a termination, even if the PA sync was not established yet. Some cleanup in the mutex handling was also done as part of this. Signed-off-by: Emil Gydesen <[email protected]>
e3ed134 to
f63641a
Compare
|



The implementation only used the receive state's PA sync state to determine whether to call the PA sync req or PA sync term req, but that state does not include the syncing state.
Rather than using the receive state's PA sync state, we add a local boolean to keep track of whether the PA sync was requested, so if we receive a mod_src with PA sync == BT_BAP_BASS_PA_REQ_NO_SYNC then we request a termination, even if the PA sync was not established yet.
Some cleanup in the mutex handling was also done as part of this.