zephyr/subsys/bluetooth/host/direction_internal.h
Piotr Pryga 66312b0e34 Bluetooth: Host: df: Fix uninit per adv sync and IQ report passed to app
In case of error in hci_df_prepare_connectionless_iq_report function
e.g. due to wrong periodic advertising sync handle, uninitilized
per_adv_sync and IQ report object were passed by cte_report_cb callback
to an application.

Correct behavior in such situation is to not to cal cte_report_cb callback.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-02-08 14:49:43 +01:00

19 lines
679 B
C

/*
* Copyright (c) 2020 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/* Performs initialization of Direction Finding in Host */
int le_df_init(void);
int hci_df_prepare_connectionless_iq_report(struct net_buf *buf,
struct bt_df_per_adv_sync_iq_samples_report *report,
struct bt_le_per_adv_sync **per_adv_sync_to_report);
int hci_df_prepare_connection_iq_report(struct net_buf *buf,
struct bt_df_conn_iq_samples_report *report,
struct bt_conn **conn_to_report);
int hci_df_prepare_conn_cte_req_failed(struct net_buf *buf,
struct bt_df_conn_iq_samples_report *report,
struct bt_conn **conn_to_report);