From 199487be54246436f0bd75aa9965927db7623f85 Mon Sep 17 00:00:00 2001 From: Alexander Svensen Date: Wed, 7 Feb 2024 08:47:01 +0100 Subject: [PATCH] Bluetooth: Host: Send status for terminated directed adv - Fix bug where status was only sent for legacy adv Signed-off-by: Alexander Svensen --- subsys/bluetooth/host/adv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/subsys/bluetooth/host/adv.c b/subsys/bluetooth/host/adv.c index 3997cb1ce0795a..7a312d5e05c855 100644 --- a/subsys/bluetooth/host/adv.c +++ b/subsys/bluetooth/host/adv.c @@ -2185,11 +2185,10 @@ void bt_hci_le_adv_set_terminated(struct net_buf *buf) if (evt->status && IS_ENABLED(CONFIG_BT_PERIPHERAL) && atomic_test_bit(adv->flags, BT_ADV_CONNECTABLE)) { - /* Only set status for legacy advertising API. - * This will call connected callback for high duty cycle + /* This will call connected callback for high duty cycle * directed advertiser timeout. */ - le_adv_stop_free_conn(adv, adv == bt_dev.adv ? evt->status : 0); + le_adv_stop_free_conn(adv, evt->status); } if (IS_ENABLED(CONFIG_BT_CONN) && !evt->status) {