From 559640cbd5bf434d46d3d1e36e6af7d4738e2057 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Wed, 9 Sep 2020 22:50:37 +0100 Subject: [PATCH] BLE: check LL resolution availability before enabling it. --- connectivity/FEATURE_BLE/source/generic/GapImpl.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/connectivity/FEATURE_BLE/source/generic/GapImpl.cpp b/connectivity/FEATURE_BLE/source/generic/GapImpl.cpp index 34e292ccbf..596cc174b7 100644 --- a/connectivity/FEATURE_BLE/source/generic/GapImpl.cpp +++ b/connectivity/FEATURE_BLE/source/generic/GapImpl.cpp @@ -920,7 +920,9 @@ ble_error_t Gap::setPeripheralPrivacyConfiguration( { _peripheral_privacy_configuration = *configuration; - update_ll_address_resolution_setting(); + if (_address_registry.is_controller_privacy_supported()) { + update_ll_address_resolution_setting(); + } return BLE_ERROR_NONE; } @@ -950,7 +952,9 @@ ble_error_t Gap::setCentralPrivacyConfiguration( { _central_privacy_configuration = *configuration; - update_ll_address_resolution_setting(); + if (_address_registry.is_controller_privacy_supported()) { + update_ll_address_resolution_setting(); + } return BLE_ERROR_NONE; }