diff --git a/subsys/bluetooth/controller/ll_sw/lll_sync.h b/subsys/bluetooth/controller/ll_sw/lll_sync.h index a1a4c86836f..4ad8832a90a 100644 --- a/subsys/bluetooth/controller/ll_sw/lll_sync.h +++ b/subsys/bluetooth/controller/ll_sw/lll_sync.h @@ -7,7 +7,8 @@ /* Periodic advertisements synchronization status. */ enum sync_status { SYNC_STAT_ALLOWED, - SYNC_STAT_READY_OR_CONT_SCAN, + SYNC_STAT_READY, + SYNC_STAT_CONT_SCAN, SYNC_STAT_TERM }; diff --git a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync.c b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync.c index 384167f479c..f214daf95db 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync.c +++ b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync.c @@ -226,7 +226,7 @@ enum sync_status lll_sync_cte_is_allowed(uint8_t cte_type_mask, uint8_t filter_p } if (!cte_ok) { - return filter_policy ? SYNC_STAT_READY_OR_CONT_SCAN : SYNC_STAT_TERM; + return filter_policy ? SYNC_STAT_CONT_SCAN : SYNC_STAT_TERM; } return SYNC_STAT_ALLOWED; @@ -869,8 +869,8 @@ static void isr_rx_adv_sync(void *param) * affect synchronization even when new CTE type is not allowed by sync parameters. * Hence the SYNC_STAT_READY is set. */ - err = isr_rx(lll, NODE_RX_TYPE_SYNC_REPORT, crc_ok, phy_flags_rx, - cte_ready, rssi_ready, SYNC_STAT_READY_OR_CONT_SCAN); + err = isr_rx(lll, NODE_RX_TYPE_SYNC_REPORT, crc_ok, phy_flags_rx, cte_ready, rssi_ready, + SYNC_STAT_READY); if (err == -EBUSY) { return; } @@ -938,8 +938,8 @@ static void isr_rx_aux_chain(void *param) * affect synchronization even when new CTE type is not allowed by sync parameters. * Hence the SYNC_STAT_READY is set. */ - err = isr_rx(lll, NODE_RX_TYPE_EXT_AUX_REPORT, crc_ok, phy_flags_rx, - cte_ready, rssi_ready, SYNC_STAT_READY_OR_CONT_SCAN); + err = isr_rx(lll, NODE_RX_TYPE_EXT_AUX_REPORT, crc_ok, phy_flags_rx, cte_ready, rssi_ready, + SYNC_STAT_READY); if (err == -EBUSY) { return; diff --git a/subsys/bluetooth/controller/ll_sw/ull_sync.c b/subsys/bluetooth/controller/ll_sw/ull_sync.c index f2a5536d50a..057c61b8246 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_sync.c +++ b/subsys/bluetooth/controller/ll_sw/ull_sync.c @@ -815,13 +815,13 @@ void ull_sync_established_report(memq_link_t *link, struct node_rx_hdr *rx) * host. If the periodic filtering list is used then stop synchronization with this * particular periodic advertised but continue to search for other one. */ - sync->is_term = (sync_status != SYNC_STAT_ALLOWED); + sync->is_term = ((sync_status == SYNC_STAT_TERM) || (sync_status == SYNC_STAT_CONT_SCAN)); #endif /* CONFIG_BT_CTLR_CTEINLINE_SUPPORT */ /* Send periodic advertisement sync established report when sync has correct CTE type * or the CTE type is incorrect and filter policy doesn't allow to continue scanning. */ - if (sync_status != SYNC_STAT_READY_OR_CONT_SCAN) { + if (sync_status == SYNC_STAT_ALLOWED || sync_status == SYNC_STAT_TERM) { #else /* !CONFIG_BT_CTLR_SYNC_PERIODIC_CTE_TYPE_FILTERING */ if (1) { @@ -853,7 +853,7 @@ void ull_sync_established_report(memq_link_t *link, struct node_rx_hdr *rx) * the sync was found or was established in the past. The report is not send if * scanning is terminated due to wrong CTE type. */ - if (sync_status == SYNC_STAT_ALLOWED) { + if (sync_status == SYNC_STAT_ALLOWED || sync_status == SYNC_STAT_READY) { #else /* !CONFIG_BT_CTLR_SYNC_PERIODIC_CTE_TYPE_FILTERING */ if (1) {