From 2305196461ead1b9ab7e1cb887bb8a949a495aca Mon Sep 17 00:00:00 2001 From: Mariusz Skmara Date: Mon, 14 Nov 2016 14:13:54 +0100 Subject: [PATCH] Bluetooth: Fix not sending L2CAP Connection Parameters Update Request This fixes issue that L2CAP Connection Parameters Update Request was not sent. There was check that used LE features of host controller to determine if L2CAP procedure or LL shall be used. It was failing with 4.2 controller. The check shall test if remote supports LL Connection Parameters Request Procedure. If it's not supported, then L2CAP Connection Parameters Update Procedure will be used. Closes ZEP-1220 1/4 L2CAP TC_LE_CPU_BV_01_C PASS 2/4 GAP TC_CONN_CPUP_BV_01_C PASS 3/4 GAP TC_CONN_CPUP_BV_02_C PASS 4/4 GAP TC_CONN_CPUP_BV_03_C PASS Change-Id: I61ad544d9568ca6306a845e05c1a2e28d1693ab4 Signed-off-by: Mariusz Skamra --- subsys/bluetooth/host/conn.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/subsys/bluetooth/host/conn.c b/subsys/bluetooth/host/conn.c index 1e1e3281121..be900bab89b 100644 --- a/subsys/bluetooth/host/conn.c +++ b/subsys/bluetooth/host/conn.c @@ -1372,8 +1372,12 @@ int bt_conn_le_param_update(struct bt_conn *conn, /* Cancel any pending update */ k_delayed_work_cancel(&conn->le.update_work); + /* + * If remote does not support LL Connection Parameters Request + * Procedure + */ if ((conn->role == BT_HCI_ROLE_SLAVE) && - !BT_FEAT_LE_CONN_PARAM_REQ_PROC(bt_dev.le.features)) { + !BT_FEAT_LE_CONN_PARAM_REQ_PROC(conn->le.features)) { return bt_l2cap_update_conn_param(conn, param); }