Commit ce56f046 authored by Piotr Pryga's avatar Piotr Pryga Committed by Carles Cufi
Browse files

bluetooth: Fix cte_type value in periodic adv sync report



Periodic advertising sync report returned wrong cte_type value.
This commit fixes the problem.

Signed-off-by: default avatarPiotr Pryga <piotr.pryga@nordicsemi.no>
parent 7cdbeb54
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
};

+4 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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) {