Merge pull request #8556 from paul-szczepanek-arm/fix-phy-support

BLE: fix using an optional feature before checking for support
pull/8572/head
Cruz Monrreal 2018-10-29 08:46:26 -05:00 committed by GitHub
commit 1489900162
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -334,8 +334,12 @@ ble_error_t Gap::set_address_resolution(
}
ble_error_t Gap::read_phy(connection_handle_t connection) {
DmReadPhy(connection);
return BLE_ERROR_NONE;
if (is_feature_supported(ControllerSupportedFeatures_t::LE_2M_PHY)
|| is_feature_supported(ControllerSupportedFeatures_t::LE_CODED_PHY)) {
DmReadPhy(connection);
return BLE_ERROR_NONE;
}
return BLE_ERROR_NOT_IMPLEMENTED;
}
ble_error_t Gap::set_preferred_phys(