From c918d08763ec547f7f226553ab75ca885db357ac Mon Sep 17 00:00:00 2001 From: Andre Eisenbach Date: Wed, 17 Sep 2014 08:45:56 -0700 Subject: [PATCH] Document LE IO capabilities and use BR/EDR constant for LE This removes a hack to set LE IO capabilities and reuses the existing constant defined in bt_target.h. Change-Id: I3c97629bd092ac78bd673afc29458775b2bce836 --- btif/co/bta_dm_co.c | 9 ++++++++- include/bt_target.h | 4 ---- stack/smp/smp_act.c | 7 ------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/btif/co/bta_dm_co.c b/btif/co/bta_dm_co.c index f7ecb13c7..d57604967 100644 --- a/btif/co/bta_dm_co.c +++ b/btif/co/bta_dm_co.c @@ -29,7 +29,14 @@ #if (defined BLE_INCLUDED && BLE_INCLUDED == TRUE) #include "bte_appl.h" -tBTE_APPL_CFG bte_appl_cfg = { 0x5, 0x4, 0x7, 0x7, 0x10 }; +tBTE_APPL_CFG bte_appl_cfg = +{ + BTM_AUTH_SPGB_YES, // Authentication requirements + BTM_LOCAL_IO_CAPS, // I/O capabilities + 7, // Initiaor key size + 7, // Responder key size + 16 // Maximum key size +}; #endif /******************************************************************************* diff --git a/include/bt_target.h b/include/bt_target.h index 9f08e7974..a34169a19 100644 --- a/include/bt_target.h +++ b/include/bt_target.h @@ -1367,10 +1367,6 @@ and USER_HW_DISABLE_API macros */ #define BLE_PERIPHERAL_MODE_SUPPORT TRUE #endif -#ifndef BLE_PERIPHERAL_DISPLAYONLY -#define BLE_PERIPHERAL_DISPLAYONLY FALSE -#endif - #ifndef BLE_PERIPHERAL_ADV_NAME #define BLE_PERIPHERAL_ADV_NAME FALSE #endif diff --git a/stack/smp/smp_act.c b/stack/smp/smp_act.c index 8392a9b85..6568316ff 100644 --- a/stack/smp/smp_act.c +++ b/stack/smp/smp_act.c @@ -109,13 +109,6 @@ void smp_send_app_cback(tSMP_CB *p_cb, tSMP_INT_DATA *p_data) { p_cb->loc_auth_req = cb_data.io_req.auth_req; p_cb->loc_io_caps = cb_data.io_req.io_cap; - -#if (defined(BLE_PERIPHERAL_DISPLAYONLY) && (BLE_PERIPHERAL_DISPLAYONLY == TRUE)) - if (p_cb->role == HCI_ROLE_SLAVE) - { - p_cb->loc_io_caps = SMP_IO_CAP_OUT; - } -#endif p_cb->loc_oob_flag = cb_data.io_req.oob_data; p_cb->loc_enc_size = cb_data.io_req.max_key_size; p_cb->loc_i_key = cb_data.io_req.init_keys; -- 2.11.0