summaryrefslogtreecommitdiffstats
path: root/device/src/controller.c
diff options
context:
space:
mode:
authorMudumba Ananth <ananthm@broadcom.com>2015-01-30 02:33:02 -0800
committerAndre Eisenbach <eisenbach@google.com>2015-04-13 14:09:06 -0700
commit899b77140675a157dba034e98527ab546bc9ac35 (patch)
tree998eb1873ed2ac4c14795b095e9b8b7516d2d6ec /device/src/controller.c
parent7fb0da6c0df9491f06c61ab0ba4183129502a065 (diff)
downloadandroid_system_bt-899b77140675a157dba034e98527ab546bc9ac35.tar.gz
android_system_bt-899b77140675a157dba034e98527ab546bc9ac35.tar.bz2
android_system_bt-899b77140675a157dba034e98527ab546bc9ac35.zip
BR/EDR secure connections support
As a part of BT 4.1 stack upgrade, added host support for BR/EDR secure connections to be able to interact with controllers that support secure connections and upgrade the SSP mechanism to use secure connection rules. This change checks for controller support in the extended_features (LMP page 2) and then declares the host support (extended_features LMP page 1) using WRITE SECURE CONNECTIONS HOST SUPPORT. If both the sides support secure connections, the simple pairing process utilizes the link key generated using P-256 elliptic curve (in the controller) and both the sides will be in a secure connection. Bug: 19289699 Change-Id: Idb3c41f439973bea137f5a4a69468c1f55aecbd7
Diffstat (limited to 'device/src/controller.c')
-rw-r--r--device/src/controller.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/device/src/controller.c b/device/src/controller.c
index 6537cf1f9..f0d3e584d 100644
--- a/device/src/controller.c
+++ b/device/src/controller.c
@@ -178,6 +178,12 @@ static future_t *start_up(void) {
page_number++;
}
+ 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)
ble_supported = last_features_classic_page_index >= 1 && HCI_LE_HOST_SUPPORTED(features_classic[1].as_array);
if (ble_supported) {