From c9e99ba09440c90d4f0a578dd6ea3b3c25831522 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Tue, 6 Jun 2023 17:25:49 +0530 Subject: [PATCH] Nimble: Expose API to clear all addresses in whitelist out of stack --- nimble/host/include/host/ble_gap.h | 7 +++++++ nimble/host/src/ble_gap.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/nimble/host/include/host/ble_gap.h b/nimble/host/include/host/ble_gap.h index fc04aa00c..7f261ed40 100644 --- a/nimble/host/include/host/ble_gap.h +++ b/nimble/host/include/host/ble_gap.h @@ -2037,6 +2037,13 @@ int ble_gap_wl_set(const ble_addr_t *addrs, uint8_t white_list_count); */ int ble_gap_wl_tx_rmv(const ble_addr_t *addrs); +/** + * Clears all addresses from controller's white list. + * + * @return 0 on success; nonzero on failure. + */ +int ble_gap_wl_tx_clear(void); + /** * Initiates a connection parameter update procedure. * diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c index dfc5b9f28..5e53d09c4 100644 --- a/nimble/host/src/ble_gap.c +++ b/nimble/host/src/ble_gap.c @@ -2465,7 +2465,7 @@ ble_gap_wl_tx_add(const ble_addr_t *addr) &cmd, sizeof(cmd), NULL, 0); } -static int +int ble_gap_wl_tx_clear(void) { return ble_hs_hci_cmd_tx(BLE_HCI_OP(BLE_HCI_OGF_LE,