You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2019/12/20 08:36:53 UTC

[mynewt-nimble] 03/04: nimble/ll: Use RPA regardless of address resolution state when scanning

This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit b6f1b7eef892535144277b69e9e741fea7c51eb9
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Wed Dec 18 11:35:04 2019 +0100

    nimble/ll: Use RPA regardless of address resolution state when scanning
    
    When scanning and local IRK is present we should use RPA regardless
    of address resolution state (as this controls peer's address resolution
    not local RPA generation).
---
 nimble/controller/src/ble_ll_scan.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/nimble/controller/src/ble_ll_scan.c b/nimble/controller/src/ble_ll_scan.c
index d0ca915..0330081 100644
--- a/nimble/controller/src/ble_ll_scan.c
+++ b/nimble/controller/src/ble_ll_scan.c
@@ -353,9 +353,11 @@ ble_ll_scan_req_pdu_prepare(struct ble_ll_scan_sm *scansm, uint8_t *adv_addr,
                 rl = &g_ble_ll_resolv_list[rpa_index];
             }
         } else {
-            if (ble_ll_resolv_enabled()) {
-                rl = ble_ll_resolv_list_find(adv_addr, adv_addr_type);
-            }
+            /* we look for RL entry to generate local RPA regardless if
+             * resolving is enabled or not (as this is is for local RPA
+             * not peer RPA)
+             */
+            rl = ble_ll_resolv_list_find(adv_addr, adv_addr_type);
         }
 
         /*