Skip to content

Commit d54f3bd

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: Controller: Fix missing reset of sync create association
Fix missing reset of sync create association with scan context when associated with both 1M and Coded PHY contexts, and sync create cancel is called. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 5494f47 commit d54f3bd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

subsys/bluetooth/controller/ll_sw/ull.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,7 @@ void ll_rx_mem_release(void **node_rx)
14561456
*/
14571457
sync = scan->periodic.sync;
14581458

1459-
ull_sync_setup_complete(scan);
1459+
ull_sync_setup_reset(scan);
14601460

14611461
if (status != BT_HCI_ERR_SUCCESS) {
14621462
memq_link_t *link_sync_lost;

subsys/bluetooth/controller/ll_sw/ull_sync.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ uint8_t ll_sync_create_cancel(void **rx)
296296
/* It is safe to remove association with scanner as cancelled flag is
297297
* set and sync has not been established.
298298
*/
299-
scan->periodic.sync = NULL;
299+
ull_sync_setup_reset(scan);
300300

301301
/* Mark the sync context as sync create cancelled */
302302
if (IS_ENABLED(CONFIG_BT_CTLR_CHECK_SAME_PEER_SYNC)) {
@@ -733,7 +733,7 @@ void ull_sync_setup(struct ll_scan_set *scan, struct ll_scan_aux_set *aux,
733733
(ret == TICKER_STATUS_BUSY));
734734
}
735735

736-
void ull_sync_setup_complete(struct ll_scan_set *scan)
736+
void ull_sync_setup_reset(struct ll_scan_set *scan)
737737
{
738738
/* Remove the sync context from being associated with scan contexts */
739739
scan->periodic.sync = NULL;

subsys/bluetooth/controller/ll_sw/ull_sync_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ void ull_sync_setup_addr_check(struct ll_scan_set *scan, uint8_t addr_type,
1414
bool ull_sync_setup_sid_match(struct ll_scan_set *scan, uint8_t sid);
1515
void ull_sync_setup(struct ll_scan_set *scan, struct ll_scan_aux_set *aux,
1616
struct node_rx_hdr *node_rx, struct pdu_adv_sync_info *si);
17-
void ull_sync_setup_complete(struct ll_scan_set *scan);
17+
void ull_sync_setup_reset(struct ll_scan_set *scan);
1818
void ull_sync_established_report(memq_link_t *link, struct node_rx_hdr *rx);
1919
void ull_sync_done(struct node_rx_event_done *done);
2020
void ull_sync_chm_update(uint8_t sync_handle, uint8_t *acad, uint8_t acad_len);

0 commit comments

Comments
 (0)