Bluetooth: controller: Add support for linked adv PDUs

This adds support to allow advertising PDUs to be linked which is
required to send advertising trains, i.e. AUX_CHAIN_IND.

PDUs are linked with a simple single-linked list, the pointer to next
PDU is stored at the very end of PDU buffer. This prevents it from
being overwritten if PDU is modified and allows for build time offset
calculation.

There are few helpers added to make handling easier, e.g.:
- get next linked PDU
- get last linked PDU
- link one PDU to another
- link PDU at the end
- release all linked PDUs (except for 1st)

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
This commit is contained in:
Andrzej Kaczmarek 2021-02-24 16:43:58 +01:00 committed by Anas Nashif
commit 21892eecf1
10 changed files with 119 additions and 10 deletions

View file

@ -165,6 +165,13 @@ config BT_CTLR_ADV_SYNC_SET
help
Maximum supported periodic advertising sets.
config BT_CTLR_ADV_PDU_LINK
bool "Enable linking of advertising PDU trains"
help
Enables extra space in each advertising PDU to allow linking PDUs. This
is required to enable advertising data trains (i.e. transmission of
AUX_CHAIN_IND).
config BT_CTLR_ADV_DATA_BUF_MAX
int "Advertising Data Maximum Buffers"
depends on BT_BROADCASTER