Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp5849752ybn; Sun, 29 Sep 2019 07:03:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWENPpEaQYOc9qIT/w9FiFNXSAT8iSmFt5apt95jQ86zCabpOFpe4oyoPW69phqS2JcNpc X-Received: by 2002:a17:906:b74e:: with SMTP id fx14mr15589867ejb.226.1569765812356; Sun, 29 Sep 2019 07:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569765812; cv=none; d=google.com; s=arc-20160816; b=GZg2aixZLVvAHKUZB7QAX2aOvPdctRzovL6G98hkpAVQTndObqR0CxPWHjIAPfqkLM W5hZqE8TI3FCrVzZzop+OMPZ/6q4kO0osTVINCUyBWdYuHn9FiR2vLxtqnYkAi0jkxrY MyQLlVzkSBQxDkn1d0Ho2QN81bs+bj1GxjdFaup4E6RbX8BVJF5MnXnNCgrBGurCrbKX R2pY8eHbIWz9Pbtg74VbkgBlCcsVTqTJj+ocqhDatki4IbF0AwM33q18TsUhUi/whpy8 LLjO3MtC+6q0OOTHmax/GXMH4WNuEdOlgYuqUCws6+KoXJR0K2c51Jq5Aef0GQS6jvIw YNCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sbWkNDo8EzS/lq5CsEbXOloppB8wk1wjINwdVldkzHs=; b=wx9qoSC3QQ43DEFYZrQKH4B6X5eWZZzSP2qVnRXlwLWmS1dlK3II2l9Us35fNAx46r 3uzyvu8LLaDrkBrXZle85eS//o67inJ7XjPJ3VJ9HZHGVQxElzqIyvJv+kqVAcaYd1sv tttHHkX2PvhwiYq+V2+ur2TU3KbBluFKjdp531YcwA8WsD3L42Mh93CoXVTY6yjkZyT+ d/LRKqh872sINBHO/LdISeZ4eYK1AmxZ2dG86ot26QezBFiVvpBpeb0X+7/LBR3J69xf G6liBL7C1K11zkIplHrHvZOp7sWnJ40qItMa9UDdamnGE+oDEIme0aiycRtGQbeHcvx5 ip/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FtjtwoxL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z10si5191736edx.168.2019.09.29.07.03.07; Sun, 29 Sep 2019 07:03:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FtjtwoxL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729893AbfI2OAZ (ORCPT + 99 others); Sun, 29 Sep 2019 10:00:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:41958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729142AbfI2OAS (ORCPT ); Sun, 29 Sep 2019 10:00:18 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4F87A218AC; Sun, 29 Sep 2019 14:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569765617; bh=E0iVFmk+TRTizMteFaTgSFFwpthtzug2PEHrve24fWQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FtjtwoxLTPIvmT8JX+00xnUx5LU9lqUyjASGBUit7fprtunqbhXG2Vj8Kh8uea7xD Dp3/ybXOgYIELXPasyTEk44UXAievWb0V4vvQUOzbD/nV7E4aSMFGG+lahejDsvznl ZaB3QfLu2jpNjJb+2i7iln5QhZuH9pQxawMf48Ps= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marcel Holtmann , Johan Hedberg , Sasha Levin Subject: [PATCH 5.2 01/45] Revert "Bluetooth: validate BLE connection interval updates" Date: Sun, 29 Sep 2019 15:55:29 +0200 Message-Id: <20190929135024.751205303@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190929135024.387033930@linuxfoundation.org> References: <20190929135024.387033930@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marcel Holtmann [ Upstream commit 68d19d7d995759b96169da5aac313363f92a9075 ] This reverts commit c49a8682fc5d298d44e8d911f4fa14690ea9485e. There are devices which require low connection intervals for usable operation including keyboards and mice. Forcing a static connection interval for these types of devices has an impact in latency and causes a regression. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg Signed-off-by: Sasha Levin --- net/bluetooth/hci_event.c | 5 ----- net/bluetooth/l2cap_core.c | 9 +-------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 17c50a98e7f78..9e4fcf406d9cd 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -5588,11 +5588,6 @@ static void hci_le_remote_conn_param_req_evt(struct hci_dev *hdev, return send_conn_param_neg_reply(hdev, handle, HCI_ERROR_UNKNOWN_CONN_ID); - if (min < hcon->le_conn_min_interval || - max > hcon->le_conn_max_interval) - return send_conn_param_neg_reply(hdev, handle, - HCI_ERROR_INVALID_LL_PARAMS); - if (hci_check_conn_params(min, max, latency, timeout)) return send_conn_param_neg_reply(hdev, handle, HCI_ERROR_INVALID_LL_PARAMS); diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 32d2be9d68585..771e3e17bb6a3 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -5297,14 +5297,7 @@ static inline int l2cap_conn_param_update_req(struct l2cap_conn *conn, memset(&rsp, 0, sizeof(rsp)); - if (min < hcon->le_conn_min_interval || - max > hcon->le_conn_max_interval) { - BT_DBG("requested connection interval exceeds current bounds."); - err = -EINVAL; - } else { - err = hci_check_conn_params(min, max, latency, to_multiplier); - } - + err = hci_check_conn_params(min, max, latency, to_multiplier); if (err) rsp.result = cpu_to_le16(L2CAP_CONN_PARAM_REJECTED); else -- 2.20.1