From 4362eda4aa344d7ac6c18aa90aa70a1d6bbce1b2 Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Fri, 30 Jun 2017 11:29:30 +0200 Subject: [PATCH] Bluetooth: controller: Fix missing re-initialization of ret_cb Fix missing re-initialization of ret_cb to TICKER_STATUS_BUSY before every new call to ticker interface functions' with operation's callback. One issue was undirected advertisement disable to return failure status in the scan_adv sample. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/ctrl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subsys/bluetooth/controller/ll_sw/ctrl.c b/subsys/bluetooth/controller/ll_sw/ctrl.c index baa96961cfa..db040eb5096 100644 --- a/subsys/bluetooth/controller/ll_sw/ctrl.c +++ b/subsys/bluetooth/controller/ll_sw/ctrl.c @@ -8147,6 +8147,7 @@ static u32_t role_disable(u8_t ticker_id_primary, u8_t ticker_id_stop) _radio.ticker_id_stop = ticker_id_primary; /* Step 1: Is Primary started? Stop the Primary ticker */ + ret_cb = TICKER_STATUS_BUSY; ret = ticker_stop(RADIO_TICKER_INSTANCE_ID_RADIO, RADIO_TICKER_USER_ID_APP, ticker_id_primary, ticker_if_done, (void *)&ret_cb); @@ -8357,6 +8358,7 @@ u32_t radio_adv_enable(u16_t interval, u8_t chl_map, u8_t filter_policy) goto failure_cleanup; } + ret_cb = TICKER_STATUS_BUSY; ret = ticker_start(RADIO_TICKER_INSTANCE_ID_RADIO, RADIO_TICKER_USER_ID_APP,