Skip to content

Commit 5494f47

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: Controller: Fix address resolution when max entries in list
Fix address resolution when trying to match the maximum entries in the resolving list. Wait for address resolution AAR peripheral to complete with checking with all the entries in the IRK list. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 66c9a8e commit 5494f47

File tree

1 file changed

+21
-4
lines changed
  • subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio

1 file changed

+21
-4
lines changed

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,10 +1606,27 @@ void radio_ar_status_reset(void)
16061606

16071607
uint32_t radio_ar_has_match(void)
16081608
{
1609-
return (radio_bc_has_match() &&
1610-
NRF_AAR->EVENTS_END &&
1611-
NRF_AAR->EVENTS_RESOLVED &&
1612-
!NRF_AAR->EVENTS_NOTRESOLVED);
1609+
if (!radio_bc_has_match()) {
1610+
return 0U;
1611+
}
1612+
1613+
nrf_aar_int_enable(NRF_AAR, AAR_INTENSET_END_Msk);
1614+
1615+
while (NRF_AAR->EVENTS_END == 0U) {
1616+
__WFE();
1617+
__SEV();
1618+
__WFE();
1619+
}
1620+
1621+
nrf_aar_int_disable(NRF_AAR, AAR_INTENCLR_END_Msk);
1622+
1623+
NVIC_ClearPendingIRQ(nrfx_get_irq_number(NRF_AAR));
1624+
1625+
if (NRF_AAR->EVENTS_RESOLVED && !NRF_AAR->EVENTS_NOTRESOLVED) {
1626+
return 1U;
1627+
}
1628+
1629+
return 0U;
16131630
}
16141631

16151632
void radio_ar_resolve(const uint8_t *addr)

0 commit comments

Comments
 (0)