From ffc74034fb416dc511aaaba73ee79deee13e5394 Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Wed, 14 Jun 2017 14:30:58 +0200 Subject: [PATCH] Bluetooth: controller: Fix missing reset of direct adv state Fix missing implementation to reset the advertiser state when directed advertisements stop without a connection being established. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/ctrl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subsys/bluetooth/controller/ll_sw/ctrl.c b/subsys/bluetooth/controller/ll_sw/ctrl.c index 14dd40981da..1c7dc80f586 100644 --- a/subsys/bluetooth/controller/ll_sw/ctrl.c +++ b/subsys/bluetooth/controller/ll_sw/ctrl.c @@ -4883,6 +4883,9 @@ void event_adv_stop(u32_t ticks_at_expire, u32_t remainder, u16_t lazy, ARG_UNUSED(lazy); ARG_UNUSED(context); + /* Reset advertiser state */ + _radio.advertiser.is_enabled = 0; + /* Stop Direct Adv */ ticker_status = ticker_stop(RADIO_TICKER_INSTANCE_ID_RADIO, @@ -4912,7 +4915,6 @@ void event_adv_stop(u32_t ticks_at_expire, u32_t remainder, u16_t lazy, /** Connection handle */ radio_pdu_node_rx->hdr.handle = 0xffff; - /** @todo */ radio_pdu_node_rx->hdr.type = NODE_RX_TYPE_CONNECTION; /* prepare connection complete structure */