zephyr/subsys/bluetooth/controller/ll_sw/ull_sync_internal.h
Troels Nilsson eab3f49247 Bluetooth: Controller: Introduce scan_aux_chain context
Introduces the concept of ll_scan_aux_chain, that allows for
keeping track of several advertising chains with a minimal
overhead. This replaces using several scan aux sets each with
an associated ticker IDs

Only one ticker is used for following chains; This is achieved
by having the scheduled chains in a sorted list and restarting
the ticker when the first in the list expires

EVENT_DONE_EXTRA_TYPE_SCAN_AUX now includes a pointer to the lll
structure to identify which chain to flush (to avoid race
conditions)

New implementation is hidden behind a config for now (defaults
to off): BT_CTLR_SCAN_AUX_USE_CHAINS

Other minor changes:
- rx_incomplete node pointer was moved to ll_sync_set
- data_len removed from ll_sync_set (it uses the chains instead)

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-10-24 16:55:35 +01:00

33 lines
1.6 KiB
C

/*
* Copyright (c) 2020 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
int ull_sync_init(void);
int ull_sync_reset(void);
uint16_t ull_sync_handle_get(struct ll_sync_set *sync);
struct ll_sync_set *ull_sync_is_enabled_get(uint16_t handle);
void ull_sync_release(struct ll_sync_set *sync);
void ull_sync_setup_addr_check(struct ll_sync_set *sync, struct ll_scan_set *scan,
uint8_t addr_type, uint8_t *addr, uint8_t rl_idx);
bool ull_sync_setup_sid_match(struct ll_sync_set *sync, struct ll_scan_set *scan, uint8_t sid);
void ull_sync_create_from_sync_transfer(uint16_t conn_handle, uint16_t service_data,
struct ll_sync_set *sync,
struct pdu_adv_sync_info *si,
uint32_t conn_offset_us);
void ull_sync_setup(struct ll_scan_set *scan, uint8_t phy,
struct node_rx_pdu *node_rx, struct pdu_adv_sync_info *si);
void ull_sync_setup_reset(struct ll_sync_set *sync);
void ull_sync_established_report(memq_link_t *link, struct node_rx_pdu *rx);
void ull_sync_done(struct node_rx_event_done *done);
void ull_sync_chm_update(uint8_t sync_handle, uint8_t *acad, uint8_t acad_len);
int ull_sync_slot_update(struct ll_sync_set *sync, uint32_t slot_plus_us,
uint32_t slot_minus_us);
struct ll_sync_set *ull_sync_is_valid_get(struct ll_sync_set *sync);
void ull_sync_transfer_received(struct ll_conn *conn, uint16_t service_data,
struct pdu_adv_sync_info *si, uint16_t conn_event_count,
uint16_t last_pa_event_counter, uint8_t sid,
uint8_t addr_type, uint8_t sca, uint8_t phy,
uint8_t *adv_addr, uint16_t sync_conn_event_count,
uint8_t addr_resolved);