mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-23 10:19:59 +00:00
nimble/host: Preempt GAP operations before removing entry from RL
This commit is contained in:
@@ -59,8 +59,8 @@ ble_hs_pvcy_set_resolve_enabled(int enable)
|
||||
&cmd, sizeof(cmd), NULL, 0);
|
||||
}
|
||||
|
||||
int
|
||||
ble_hs_pvcy_remove_entry(uint8_t addr_type, const uint8_t *addr)
|
||||
static int
|
||||
ble_hs_pvcy_remove_entry_hci(uint8_t addr_type, const uint8_t *addr)
|
||||
{
|
||||
struct ble_hci_le_rmv_resolve_list_cp cmd;
|
||||
|
||||
@@ -76,6 +76,21 @@ ble_hs_pvcy_remove_entry(uint8_t addr_type, const uint8_t *addr)
|
||||
&cmd, sizeof(cmd), NULL, 0);
|
||||
}
|
||||
|
||||
int
|
||||
ble_hs_pvcy_remove_entry(uint8_t addr_type, const uint8_t *addr)
|
||||
{
|
||||
int rc;
|
||||
|
||||
/* Need to preempt all GAP procedures (advertising, pending connections)
|
||||
* before modifying resolving list in the controller
|
||||
*/
|
||||
ble_gap_preempt();
|
||||
rc = ble_hs_pvcy_remove_entry_hci(addr_type, addr);
|
||||
ble_gap_preempt_done();
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
ble_hs_pvcy_clear_entries(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user