BLE: fix termination of periodic advertising sync #14264
Merged
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.
Summary of changes
This is a fix for Cordio peculiarity where it expects internal sync id instead of the handle to terminate a periodic advertising sync.
There are 3 ids for a sync: SID, handle, sync ID. SID can be used to create the sync, handle is used by the controller to identify the sync, sync ID is an internal cordio host id that identifies the sync control block. The problem is that the terminate sync function doesn't use the controller handle as an argument and instead expects the internal handle.
This is a workaround since now the user is getting the internal sync id instead of the handle - which should be OK since the handle can be considered an opaque ID and should not be used by the user for anything else.
Real solution IMHO would be to create a Cordio terminate function that accepts the handle instead.
Impact of changes
Migration actions required
Documentation
none
Pull request type
Test results
Reviewers
@pan-