From 69dfcc6fcab92cd2772e69f257e5f6d2384df251 Mon Sep 17 00:00:00 2001 From: Joakim Andersson Date: Wed, 22 Apr 2020 20:19:15 +0200 Subject: [PATCH] Bluetooth: host: Add Kconfig option for auto data length procedure Add Kconfig option so that the application can disable automatic initiation of the data length procedure. This is symmetric with the PHY auto initiation kconfig option. Signed-off-by: Joakim Andersson --- subsys/bluetooth/host/Kconfig | 15 +++++++++++++-- subsys/bluetooth/host/hci_core.c | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/subsys/bluetooth/host/Kconfig b/subsys/bluetooth/host/Kconfig index f310d15ae26..95ffa6833a6 100644 --- a/subsys/bluetooth/host/Kconfig +++ b/subsys/bluetooth/host/Kconfig @@ -268,10 +268,21 @@ config BT_AUTO_PHY_UPDATE help Initiate PHY Update Procedure on connection establishment. - Disable this if you want PHY Update Procedure feature supported but - want to rely on remote device to initiate the procedure at its + Disable this if you want the PHY Update Procedure feature supported + but want to rely on the remote device to initiate the procedure at its discretion. +config BT_AUTO_DATA_LEN_UPDATE + bool "Auto-initiate Data Length Update procedure" + depends on BT_DATA_LEN_UPDATE + default y + help + Initiate Data Length Update Procedure on connection establishment. + + Disable this if you want the Data Length Update Procedure feature + supported but want to rely on the remote device to initiate the + procedure at its discretion. + config BT_REMOTE_INFO bool "Enable application access to remote information" help diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index a0a7c31f5d6..4f90eab47d8 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -1895,7 +1895,7 @@ static void conn_auto_initiate(struct bt_conn *conn) } } - if (IS_ENABLED(CONFIG_BT_DATA_LEN_UPDATE) && + if (IS_ENABLED(CONFIG_BT_AUTO_DATA_LEN_UPDATE) && BT_FEAT_LE_DLE(bt_dev.le.features)) { u16_t tx_octets, tx_time;