diff options
author | Andre Eisenbach <eisenbach@google.com> | 2015-05-26 17:40:12 -0700 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2015-05-26 17:40:12 -0700 |
commit | 67a784b9f9fc73816b9dccd18fcb3863888b444a (patch) | |
tree | b6d9c68b044b2ff7db481de6dc9446b6a51ed93d | |
parent | dea4f9b42fd373d8a46565d933ec49a6583a9117 (diff) | |
download | android_system_bt-67a784b9f9fc73816b9dccd18fcb3863888b444a.tar.gz android_system_bt-67a784b9f9fc73816b9dccd18fcb3863888b444a.tar.bz2 android_system_bt-67a784b9f9fc73816b9dccd18fcb3863888b444a.zip |
Make secure connections mode configurable
Change-Id: Id6101abc1fc339147c8b55023c7426ec1c807ee6
-rw-r--r-- | device/src/controller.c | 8 | ||||
-rw-r--r-- | include/bt_target.h | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/device/src/controller.c b/device/src/controller.c index 62051d5fe..51016254f 100644 --- a/device/src/controller.c +++ b/device/src/controller.c @@ -147,12 +147,6 @@ static future_t *start_up(void) { packet_parser->parse_generic_command_complete(response); } - secure_connections_supported = HCI_SC_CTRLR_SUPPORTED(features_classic[2].as_array); - if (secure_connections_supported) { - response = AWAIT_COMMAND(packet_factory->make_write_secure_connections_host_support(HCI_SC_MODE_ENABLED)); - packet_parser->parse_generic_command_complete(response); - } - #if (BLE_INCLUDED == TRUE) if (HCI_LE_SPT_SUPPORTED(features_classic[0].as_array)) { uint8_t simultaneous_le_host = HCI_SIMUL_LE_BREDR_SUPPORTED(features_classic[0].as_array) ? BTM_BLE_SIMULTANEOUS_HOST : 0; @@ -180,11 +174,13 @@ static future_t *start_up(void) { page_number++; } +#if (SC_MODE_INCLUDED == TRUE) secure_connections_supported = HCI_SC_CTRLR_SUPPORTED(features_classic[2].as_array); if (secure_connections_supported) { response = AWAIT_COMMAND(packet_factory->make_write_secure_connections_host_support(HCI_SC_MODE_ENABLED)); packet_parser->parse_generic_command_complete(response); } +#endif #if (BLE_INCLUDED == TRUE) ble_supported = last_features_classic_page_index >= 1 && HCI_LE_HOST_SUPPORTED(features_classic[1].as_array); diff --git a/include/bt_target.h b/include/bt_target.h index 4efe8903c..f712d2c1a 100644 --- a/include/bt_target.h +++ b/include/bt_target.h @@ -595,6 +595,11 @@ ** End of Lisbon Features **************************/ +/* 4.1/4.2 secure connections feature */ +#ifndef SC_MODE_INCLUDED +#define SC_MODE_INCLUDED TRUE +#endif + /* Used for conformance testing ONLY */ #ifndef BTM_BLE_CONFORMANCE_TESTING #define BTM_BLE_CONFORMANCE_TESTING FALSE |