Skip to content

Commit 39570bd

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: Controller: Fix missing configure of Device Address Match
Fix missing configure of Device Address Matching when receiving auxiliary PDUs. This fixes some privacy related conformance test cases. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent e60ac09 commit 39570bd

File tree

1 file changed

+31
-10
lines changed

1 file changed

+31
-10
lines changed

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv_aux.c

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -216,23 +216,44 @@ static int prepare_cb(struct lll_prepare_param *p)
216216
scan_pdu = lll_adv_scan_rsp_latest_get(lll_adv, &upd);
217217
LL_ASSERT(scan_pdu);
218218

219+
radio_isr_set(isr_tx_rx, lll);
220+
radio_tmr_tifs_set(EVENT_IFS_US);
221+
radio_switch_complete_and_rx(phy_s);
222+
223+
if (false) {
224+
219225
#if defined(CONFIG_BT_CTLR_PRIVACY)
220-
if (upd) {
226+
} else if (upd) {
221227
/* Copy the address from the adv packet we will send
222228
* into the scan response.
223229
*/
224230
memcpy(&scan_pdu->adv_ext_ind.ext_hdr.data[ADVA_OFFSET],
225231
&sec_pdu->adv_ext_ind.ext_hdr.data[ADVA_OFFSET],
226232
BDADDR_SIZE);
227233
}
228-
#else
229-
ARG_UNUSED(scan_pdu);
230-
ARG_UNUSED(upd);
231-
#endif /* !CONFIG_BT_CTLR_PRIVACY */
232234

233-
radio_isr_set(isr_tx_rx, lll);
234-
radio_tmr_tifs_set(EVENT_IFS_US);
235-
radio_switch_complete_and_rx(phy_s);
235+
if (ull_filter_lll_rl_enabled()) {
236+
struct lll_filter *filter =
237+
ull_filter_lll_get(!!(lll_adv->filter_policy));
238+
239+
radio_filter_configure(filter->enable_bitmask,
240+
filter->addr_type_bitmask,
241+
(uint8_t *)filter->bdaddr);
242+
#endif /* CONFIG_BT_CTLR_PRIVACY */
243+
244+
} else if (IS_ENABLED(CONFIG_BT_CTLR_FILTER_ACCEPT_LIST) &&
245+
lll_adv->filter_policy) {
246+
struct lll_filter *fal = ull_filter_lll_get(true);
247+
248+
radio_filter_configure(fal->enable_bitmask,
249+
fal->addr_type_bitmask,
250+
(uint8_t *)fal->bdaddr);
251+
ARG_UNUSED(scan_pdu);
252+
ARG_UNUSED(upd);
253+
} else {
254+
ARG_UNUSED(scan_pdu);
255+
ARG_UNUSED(upd);
256+
}
236257

237258
#if defined(CONFIG_BT_CTLR_ADV_PDU_BACK2BACK)
238259
} else if (sec_pdu->adv_ext_ind.ext_hdr_len &&
@@ -632,10 +653,10 @@ static inline int isr_rx_pdu(struct lll_adv_aux *lll_aux,
632653
#if defined(CONFIG_BT_PERIPHERAL)
633654
} else if ((pdu_rx->type == PDU_ADV_TYPE_AUX_CONNECT_REQ) &&
634655
(pdu_rx->len == sizeof(struct pdu_adv_connect_ind)) &&
656+
lll->conn &&
635657
lll_adv_connect_ind_check(lll, pdu_rx, tx_addr, addr,
636658
rx_addr, tgt_addr,
637-
devmatch_ok, &rl_idx) &&
638-
lll->conn) {
659+
devmatch_ok, &rl_idx)) {
639660
struct node_rx_ftr *ftr;
640661
struct node_rx_pdu *rx;
641662
struct pdu_adv *pdu_tx;

0 commit comments

Comments
 (0)