From 24e3fd521e75982b5688d8877ed75c53dfa35c06 Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Thu, 9 Apr 2020 13:59:48 +0530 Subject: [PATCH] Bluetooth: controller: split: Fix missing reset of scanner state Fix missing reset of scanner state which could cause a spurious SCAN_RSP packet without a prior SCAN_REQ being sent to be reported. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/nordic/lll/lll_scan.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_scan.c b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_scan.c index 2e7c9895f0d..70d785a9b0a 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_scan.c +++ b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_scan.c @@ -144,6 +144,8 @@ static int prepare_cb(struct lll_prepare_param *p) return 0; } + lll->state = 0U; + radio_reset(); #if defined(CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL) radio_tx_power_set(lll->tx_pwr_lvl); @@ -516,10 +518,13 @@ static void isr_common_done(void *param) static void isr_done(void *param) { + struct lll_scan *lll = param; uint32_t start_us; isr_common_done(param); + lll->state = 0U; + #if defined(CONFIG_BT_CTLR_GPIO_LNA_PIN) start_us = radio_tmr_start_now(0);