Skip to content

Commit ed61065

Browse files
erbr-otcarlescufi
authored andcommitted
Bluetooth: controller: ull_filter: RPA ADV refresh fix
local variable (idx) was used in conflicting contexts Signed-off-by: Erik Brockhoff <[email protected]>
1 parent c68ae69 commit ed61065

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

subsys/bluetooth/controller/ll_sw/ull_filter.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -865,15 +865,15 @@ static void rpa_adv_refresh(struct ll_adv_set *adv)
865865
{
866866
struct pdu_adv *prev;
867867
struct pdu_adv *pdu;
868-
u8_t idx;
868+
u8_t rl_idx, idx;
869869

870870
if (adv->own_addr_type != BT_ADDR_LE_PUBLIC_ID &&
871871
adv->own_addr_type != BT_ADDR_LE_RANDOM_ID) {
872872
return;
873873
}
874874

875-
idx = ull_filter_rl_find(adv->id_addr_type, adv->id_addr, NULL);
876-
if (idx >= ARRAY_SIZE(rl)) {
875+
rl_idx = ull_filter_rl_find(adv->id_addr_type, adv->id_addr, NULL);
876+
if (rl_idx >= ARRAY_SIZE(rl)) {
877877
return;
878878
}
879879

@@ -888,7 +888,7 @@ static void rpa_adv_refresh(struct ll_adv_set *adv)
888888
pdu->chan_sel = 0;
889889
}
890890

891-
ull_filter_adv_pdu_update(adv, idx, pdu);
891+
ull_filter_adv_pdu_update(adv, rl_idx, pdu);
892892

893893
memcpy(&pdu->adv_ind.data[0], &prev->adv_ind.data[0],
894894
prev->len - BDADDR_SIZE);

0 commit comments

Comments
 (0)