Skip to content

Commit dfa6344

Browse files
Bluetooth: Controller: Fix parsing sync report PDU
AdvA, TargetA, ADI and SyncInfo are RFU in periodic advertising PDUs so we should ignore them when present in PDU. Signed-off-by: Andrzej Kaczmarek <[email protected]>
1 parent 8743311 commit dfa6344

File tree

1 file changed

+13
-3
lines changed
  • subsys/bluetooth/controller/hci

1 file changed

+13
-3
lines changed

subsys/bluetooth/controller/hci/hci.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5573,8 +5573,13 @@ static void le_per_adv_sync_report(struct pdu_data *pdu_data,
55735573

55745574
ptr = h->data;
55755575

5576-
/* No AdvA */
5577-
/* No TargetA */
5576+
if (h->adv_addr) {
5577+
ptr += BDADDR_SIZE;
5578+
}
5579+
5580+
if (h->tgt_addr) {
5581+
ptr += BDADDR_SIZE;
5582+
}
55785583

55795584
if (h->cte_info) {
55805585
struct pdu_cte_info *cte_info;
@@ -5586,7 +5591,9 @@ static void le_per_adv_sync_report(struct pdu_data *pdu_data,
55865591
BT_DBG(" CTE type= %d", cte_type);
55875592
}
55885593

5589-
/* No ADI */
5594+
if (h->adi) {
5595+
ptr += sizeof(struct pdu_adv_adi);
5596+
}
55905597

55915598
/* AuxPtr */
55925599
if (h->aux_ptr) {
@@ -5615,6 +5622,9 @@ static void le_per_adv_sync_report(struct pdu_data *pdu_data,
56155622
}
56165623

56175624
/* No SyncInfo */
5625+
if (h->sync_info) {
5626+
ptr += sizeof(struct pdu_adv_sync_info);
5627+
}
56185628

56195629
/* Tx Power */
56205630
if (h->tx_pwr) {

0 commit comments

Comments
 (0)