From 06e5cf96d4a3346e4194f918d21597e1f4554052 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 18 Jan 2017 12:35:50 +0100 Subject: [PATCH] hci: make hci_le_set_own_address_type available for central-only builds --- src/hci.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/hci.c b/src/hci.c index 3b929f301..7d5c93c9e 100644 --- a/src/hci.c +++ b/src/hci.c @@ -3581,17 +3581,6 @@ uint8_t gap_connect_cancel(void){ } #endif -void hci_le_set_own_address_type(uint8_t own_address_type){ - log_info("hci_le_set_own_address_type: old %u, new %u", hci_stack->le_own_addr_type, own_address_type); - if (own_address_type == hci_stack->le_own_addr_type) return; - hci_stack->le_own_addr_type = own_address_type; - - // update advertisement parameters, too - hci_stack->le_advertisements_todo |= LE_ADVERTISEMENT_TASKS_SET_PARAMS; - gap_advertisments_changed(); - // note: we don't update scan parameters or modify ongoing connection attempts -} - /** * @brief Updates the connection parameters for a given LE connection * @param handle @@ -3716,6 +3705,18 @@ void gap_advertisements_enable(int enabled){ } #endif + +void hci_le_set_own_address_type(uint8_t own_address_type){ + log_info("hci_le_set_own_address_type: old %u, new %u", hci_stack->le_own_addr_type, own_address_type); + if (own_address_type == hci_stack->le_own_addr_type) return; + hci_stack->le_own_addr_type = own_address_type; + + // update advertisement parameters, too + hci_stack->le_advertisements_todo |= LE_ADVERTISEMENT_TASKS_SET_PARAMS; + gap_advertisments_changed(); + // note: we don't update scan parameters or modify ongoing connection attempts +} + #endif uint8_t gap_disconnect(hci_con_handle_t handle){