Skip to content
Commit aecdf4c2 authored by Piotr Pryga's avatar Piotr Pryga Committed by Anas Nashif
Browse files

Bluetooth: controller: df: fix error in remove CTE from per adv



cte_info_clear function is responsible for remove of CTE from
periodic advertising PDUs, including remove from optional chained
PDUs. The function uses subortinate function rem_cte_info_from_per_-
adv_chain to remove CTE from chained PDUs.

The rem_cte_info_from_per_adv_chain had pdu_prev and pdu as arguments.
After return from the function the pdu_prev should point to last
PDU from previously used periodic advertising data and pdu should
point to last new periodic advertising data.

The rem_cte_info_from_per_adv_chain function removes CTEInfo from
all but last one PDU. Last PDU must have removed AuxPtr field also.
Remove of CTEInfo and AuxPtr from last PDU is done explicitly in
the cte_info_clear function.

Unfortunately rem_cte_info_from_per_adv_chain had wrong type of
parameters for pdu_prev and pdu. These parameters were pointers
instead od double pointers.
That caused cte_info_clear function to remove CTEInfo and AuxPtr
from first PDU in a chain, which is AUX_SYNC_IND.

Changed parameters pdu_prev and pdu in the rem_cte_info_from_per_adv_-
chain to be double pointers.

Added small corrections in comments.

Signed-off-by: default avatarPiotr Pryga <piotr.pryga@nordicsemi.no>
Co-authored-by: default avatarEmil Gydesen <Thalley@users.noreply.github.com>
parent 4e43295d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment