Skip to content

Commit cabcae2

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: controller: Fix incorrect prev periodic header flag access
Fix Periodic Advertising PDU population from incorrectly populating new PDU when there is no common extended header flags being set in the previous PDU and or the new PDU. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent c024645 commit cabcae2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

subsys/bluetooth/controller/ll_sw/ull_adv_sync.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,11 @@ static uint8_t adv_sync_hdr_set_clear(struct lll_adv_sync *lll_sync,
672672
/* Get common pointers from reference to previous tertiary PDU data */
673673
ter_com_hdr_prev = (void *)&ter_pdu_prev->adv_ext_ind;
674674
ter_hdr = (void *)ter_com_hdr_prev->ext_hdr_adv_data;
675-
ter_hdr_prev = *ter_hdr;
675+
if (ter_com_hdr_prev->ext_hdr_len) {
676+
ter_hdr_prev = *ter_hdr;
677+
} else {
678+
*(uint8_t *)&ter_hdr_prev = 0U;
679+
}
676680
ter_dptr_prev = ter_hdr->data;
677681

678682
/* Set common fields in reference to new tertiary PDU data buffer */

0 commit comments

Comments
 (0)