Skip to content

Commit 62e7194

Browse files
Bluetooth: controller: Add initial support to update AD in chain
This adds some initial support to update AD in chain. We still only support placing AD in 1st PDU, but this will properly copy any linked PDUs that may be added due to e.g. CTEInfo present. Signed-off-by: Andrzej Kaczmarek <[email protected]>
1 parent 9768d0a commit 62e7194

File tree

3 files changed

+407
-108
lines changed

3 files changed

+407
-108
lines changed

subsys/bluetooth/controller/ll_sw/ull_adv_internal.h

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,35 @@ uint8_t ull_adv_aux_hdr_set_clear(struct ll_adv_set *adv,
110110
/* helper function to release periodic advertising instance */
111111
void ull_adv_sync_release(struct ll_adv_sync_set *sync);
112112

113+
/* helper function to allocate new PDU data for AUX_SYNC_IND and return
114+
* previous and new PDU for further processing.
115+
*/
116+
uint8_t ull_adv_sync_pdu_alloc(struct ll_adv_set *adv,
117+
uint16_t hdr_add_fields,
118+
uint16_t hdr_rem_fields,
119+
struct adv_pdu_field_data *data,
120+
struct pdu_adv **ter_pdu_prev,
121+
struct pdu_adv **ter_pdu_new,
122+
void **extra_data_prev,
123+
void **extra_data_new,
124+
uint8_t *ter_idx);
125+
113126
/* helper function to set/clear common extended header format fields
114127
* for AUX_SYNC_IND PDU.
115128
*/
116-
uint8_t ull_adv_sync_pdu_set_clear(struct ll_adv_set *adv,
129+
uint8_t ull_adv_sync_pdu_set_clear(struct lll_adv_sync *lll_sync,
130+
struct pdu_adv *ter_pdu_prev,
131+
struct pdu_adv *ter_pdu,
117132
uint16_t hdr_add_fields,
118133
uint16_t hdr_rem_fields,
119-
struct adv_pdu_field_data *data,
120-
uint8_t *ter_idx);
134+
struct adv_pdu_field_data *data);
135+
136+
/* helper function to update extra_data field */
137+
void ull_adv_sync_extra_data_set_clear(void *extra_data_prev,
138+
void *extra_data_new,
139+
uint16_t hdr_add_fields,
140+
uint16_t hdr_rem_fields,
141+
void *data);
121142

122143
/* helper function to calculate common ext adv payload header length and
123144
* adjust the data pointer.

0 commit comments

Comments
 (0)