diff options
author | Lukasz Rymanowski <lukasz.rymanowski@tieto.com> | 2015-02-17 23:56:34 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2015-02-19 10:32:51 +0100 |
commit | 4c838a11c5a3b6bd40ad9f6050e06bb305772235 (patch) | |
tree | e95ae4b7e8a27c9bc2fa153df009a4c8785ba7e0 /android/bluetooth.c | |
parent | ae443493b7bb73b27d376a419ecbbf29e09aa92a (diff) | |
download | bluez-4c838a11c5a3b6bd40ad9f6050e06bb305772235.tar.gz |
android/bluetooth: Fix enabling secure connection
Current code works fine for controllers supporting BR/EDR secure
connections.
We want to have LE Secure connection enabled also for controllers which
does not support BR/EDR secure connections. For this we need to set
secure connection in the kernel just after LE is enabled (if requested
on register)
Diffstat (limited to 'android/bluetooth.c')
-rw-r--r-- | android/bluetooth.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/android/bluetooth.c b/android/bluetooth.c index 4ce3b9493..45cac5f38 100644 --- a/android/bluetooth.c +++ b/android/bluetooth.c @@ -3390,9 +3390,6 @@ static void read_info_complete(uint8_t status, uint16_t length, if (missing_settings & MGMT_SETTING_SSP) set_mode(MGMT_OP_SET_SSP, 0x01); - if (missing_settings & MGMT_SETTING_SECURE_CONN) - set_mode(MGMT_OP_SET_SECURE_CONN, 0x01); - if (missing_settings & MGMT_SETTING_BONDABLE) set_mode(MGMT_OP_SET_BONDABLE, 0x01); @@ -5295,6 +5292,10 @@ bool bt_bluetooth_register(struct ipc *ipc, uint8_t mode) goto failed; } + /* Requested mode is set now, let's enable secure connection */ + if (missing_settings & MGMT_SETTING_SECURE_CONN) + set_mode(MGMT_OP_SET_SECURE_CONN, 0x01); + /* Set initial default name */ if (!adapter.name) { adapter.name = g_strdup(bt_config_get_model()); |