diff --git a/include/bluetooth/bluetooth.h b/include/bluetooth/bluetooth.h index 5ad323ed22d..2fe96fe1dc8 100644 --- a/include/bluetooth/bluetooth.h +++ b/include/bluetooth/bluetooth.h @@ -1171,7 +1171,7 @@ struct bt_le_per_adv_sync_recv_info { /** The RSSI of the advertisement excluding any CTE. */ int8_t rssi; - /** The Constant Tone Extension (CTE) of the advertisement */ + /** The Constant Tone Extension (CTE) of the advertisement (@ref bt_df_cte_type) */ uint8_t cte_type; }; diff --git a/subsys/bluetooth/controller/hci/hci.c b/subsys/bluetooth/controller/hci/hci.c index bc1181fdf3f..9a3e22d0674 100644 --- a/subsys/bluetooth/controller/hci/hci.c +++ b/subsys/bluetooth/controller/hci/hci.c @@ -5267,7 +5267,10 @@ static void le_per_adv_sync_report(struct pdu_data *pdu_data, /* No TargetA */ if (h->cte_info) { - cte_type = *(int8_t *)ptr; + struct pdu_cte_info *cte_info; + + cte_info = (void *)ptr; + cte_type = cte_info->type; ptr++; BT_DBG(" CTE type= %d", cte_type); diff --git a/subsys/bluetooth/host/scan.c b/subsys/bluetooth/host/scan.c index 1316b6c4220..6f53b991a7f 100644 --- a/subsys/bluetooth/host/scan.c +++ b/subsys/bluetooth/host/scan.c @@ -657,7 +657,7 @@ void bt_hci_le_per_adv_report(struct net_buf *buf) info.tx_power = evt->tx_power; info.rssi = evt->rssi; - info.cte_type = evt->cte_type; + info.cte_type = BIT(evt->cte_type); info.addr = &per_adv_sync->addr; SYS_SLIST_FOR_EACH_CONTAINER(&pa_sync_cbs, listener, node) {