mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-01 00:28:18 +00:00
hci: ENABLE_LE_WHITELIST_TOUCH_AFTER_RESOLVING_LIST_UPDATE triggers whitelist entry refresh on resolving list remove
This commit is contained in:
parent
453459dd5b
commit
f5228c62df
@ -26,6 +26,10 @@
|
||||
// work around bug in Controller ACL fragmentation
|
||||
#define ENABLE_LE_LIMIT_ACL_FRAGMENT_BY_MAX_OCTETS
|
||||
|
||||
// work around bug in Controller
|
||||
#define ENABLE_LE_WHITELIST_TOUCH_AFTER_RESOLVING_LIST_UPDATE
|
||||
|
||||
|
||||
// BTstack configuration. buffers, sizes, ...
|
||||
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy
|
||||
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
|
||||
|
13
src/hci.c
13
src/hci.c
@ -3855,6 +3855,19 @@ static bool hci_run_general_gap_le(void){
|
||||
sm_key_t peer_irk;
|
||||
le_device_db_info(i, &peer_identity_addr_type, peer_identity_addreses, peer_irk);
|
||||
if (peer_identity_addr_type == BD_ADDR_TYPE_UNKNOWN) continue;
|
||||
|
||||
#ifdef ENABLE_LE_WHITELIST_TOUCH_AFTER_RESOLVING_LIST_UPDATE
|
||||
// trigger whitelist entry 'update' (work around for controller bug)
|
||||
btstack_linked_list_iterator_init(&lit, &hci_stack->le_whitelist);
|
||||
while (btstack_linked_list_iterator_has_next(&lit)) {
|
||||
whitelist_entry_t *entry = (whitelist_entry_t *) btstack_linked_list_iterator_next(&lit);
|
||||
if (entry->address_type != peer_identity_addr_type) continue;
|
||||
if (memcmp(entry->address, peer_identity_addreses, 6) != 0) continue;
|
||||
log_info("trigger whitelist update %s", bd_addr_to_str(peer_identity_addreses));
|
||||
entry->state |= LE_WHITELIST_REMOVE_FROM_CONTROLLER | LE_WHITELIST_ADD_TO_CONTROLLER;
|
||||
}
|
||||
#endif
|
||||
|
||||
hci_send_cmd(&hci_le_remove_device_from_resolving_list, peer_identity_addr_type, peer_identity_addreses);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user