From f5d2d997624872a1c55f135b4fd351e446ea2c48 Mon Sep 17 00:00:00 2001 From: Joakim Andersson Date: Wed, 12 Jun 2019 11:54:37 +0200 Subject: [PATCH] Bluetooth: controller: Fix scan request when advertising directed Fix scan requests being processed during directed advertisiments. Directed advertise packets are not scannable Signed-off-by: Joakim Andersson --- subsys/bluetooth/controller/ll_sw/ctrl.c | 1 + subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv.c | 1 + 2 files changed, 2 insertions(+) diff --git a/subsys/bluetooth/controller/ll_sw/ctrl.c b/subsys/bluetooth/controller/ll_sw/ctrl.c index 681fd562c0a..8e46c2e480d 100644 --- a/subsys/bluetooth/controller/ll_sw/ctrl.c +++ b/subsys/bluetooth/controller/ll_sw/ctrl.c @@ -962,6 +962,7 @@ static inline u32_t isr_rx_adv(u8_t devmatch_ok, u8_t devmatch_id, if ((pdu_adv->type == PDU_ADV_TYPE_SCAN_REQ) && (pdu_adv->len == sizeof(struct pdu_adv_scan_req)) && + (_pdu_adv->type != PDU_ADV_TYPE_DIRECT_IND) && isr_adv_sr_check(_pdu_adv, pdu_adv, devmatch_ok, &rl_idx)) { #if defined(CONFIG_BT_CTLR_SCAN_REQ_NOTIFY) diff --git a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv.c b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv.c index b32059d4122..a118484154f 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv.c +++ b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv.c @@ -627,6 +627,7 @@ static inline int isr_rx_pdu(struct lll_adv *lll, if ((pdu_rx->type == PDU_ADV_TYPE_SCAN_REQ) && (pdu_rx->len == sizeof(struct pdu_adv_scan_req)) && + (pdu_adv->type != PDU_ADV_TYPE_DIRECT_IND) && isr_rx_sr_check(lll, pdu_adv, pdu_rx, devmatch_ok, &rl_idx)) { radio_isr_set(isr_done, lll); radio_switch_complete_and_disable();