You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by na...@apache.org on 2019/07/01 11:33:26 UTC
[mynewt-nimble] branch master updated: nimble/ll: Fix using ID
address types when filtering duplicates
This is an automated email from the ASF dual-hosted git repository.
naraj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new 34ee363 nimble/ll: Fix using ID address types when filtering duplicates
34ee363 is described below
commit 34ee363fdeb9887eb38e96f89b1fde556ec0bc7e
Author: MichaĆ Narajowski <mi...@codecoup.pl>
AuthorDate: Mon Jul 1 12:56:53 2019 +0200
nimble/ll: Fix using ID address types when filtering duplicates
The duplicate list should store only public/random address types
and not public_id/random_id.
Without this change there would be an assert in
ble_ll_scan_dup_update_legacy when scanning resolved address.
---
nimble/controller/src/ble_ll_scan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nimble/controller/src/ble_ll_scan.c b/nimble/controller/src/ble_ll_scan.c
index a7f691b..52e760b 100644
--- a/nimble/controller/src/ble_ll_scan.c
+++ b/nimble/controller/src/ble_ll_scan.c
@@ -141,10 +141,10 @@ g_ble_ll_scan_rsp_advs[MYNEWT_VAL(BLE_LL_NUM_SCAN_RSP_ADVS)];
/* Duplicates filtering data */
#define BLE_LL_SCAN_ENTRY_TYPE_LEGACY(addr_type) \
- (addr_type)
+ ((addr_type) & 1)
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV)
#define BLE_LL_SCAN_ENTRY_TYPE_EXT(addr_type, has_aux, is_anon, adi) \
- (((adi >> 8) & 0xF0) | (1 << 3) | (is_anon << 2) | (has_aux << 1) | (addr_type))
+ (((adi >> 8) & 0xF0) | (1 << 3) | (is_anon << 2) | (has_aux << 1) | ((addr_type) & 1))
#endif
#define BLE_LL_SCAN_DUP_F_ADV_REPORT_SENT (0x01)