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 <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2017-06-14 14:30:58 +02:00 committed by Carles Cufi
commit ffc74034fb

View file

@ -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 */