Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp43455ybb; Tue, 7 Apr 2020 16:25:44 -0700 (PDT) X-Google-Smtp-Source: APiQypLxJvodkJ9qJJcaEPDgyzUsdXKxBvWJBBdBqsX8XquReiNYjGWPD9jRCiF0FgQGVwF5VOTg X-Received: by 2002:aca:ddc5:: with SMTP id u188mr456549oig.8.1586301943541; Tue, 07 Apr 2020 16:25:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586301943; cv=none; d=google.com; s=arc-20160816; b=DvfSN1xUr4GPIKgwjn0x9+ssO3rfDX9vcN5mPyQZ3W4QwZ9BmtZXiv8sXxt2uf1mVn 9q+kbkW229MEUeJ6XqPZxs4PT1J2kZA7b3sGpKtPFykfJdE+CQ6Vw6lhnT+Ge/LOoN5z 9LoWJ6CkuXrdWr7ORxhpiny4gO9e+WLySagS7BbVcP6njlymgUF7Ec6GIPWMGuuEmtML KkW8UcI1a8PBz+DF5yGQTlzZxPZqISYRf6plJs5SAYcjAcPxhvX6Zy9yDCLx3P0VQjo/ VIg+edI5WgoNJs9Q/jb1vLcf91lUCit1LBleB+YtuB2EWxTN78XE4+eeWDhuvoDKL4Ez YM6g== 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 :message-id:date:subject:to:from; bh=JWrdO2/1ZCprWtPOs08exPzA92FOv5Pz9T9TY+MgvXI=; b=F9NIITRvhB5gZaLs9CAc05R+lfey7jNRzzC712uflPZHLXhTB6RMoU0vLP32tX3n3I n1OdzkaRUjpqZMicXAA2bRj+IPRoM0VqyPqc6uBK3hKMQ8FUZhn4VadnKy7tOTyJ0B2D ClYwYlN43lkPW/oLioZHNNg/WBJJ2wfdfyPDpMFAXvynvlp8YgAELjGnkEGt6mP7R/B8 3xeWPuxWFg/0BEbqJ7pVZRn/SFmDHvhMX/ZyyqXZi3Qs2hCeVqWF9AgyvcGnYjrRNTuG ZH7thkfnMQXeSfBEvY34o89SEOhkXllEj1k+NBPtk/zw9/guyZZz/M8tFSh9TqwbPd2U Aw5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-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 n1si1974064otf.299.2020.04.07.16.25.29; Tue, 07 Apr 2020 16:25:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726393AbgDGXZ2 (ORCPT + 99 others); Tue, 7 Apr 2020 19:25:28 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:49216 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726386AbgDGXZ2 (ORCPT ); Tue, 7 Apr 2020 19:25:28 -0400 Received: from localhost.localdomain (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id D5410CECDD for ; Wed, 8 Apr 2020 01:35:01 +0200 (CEST) From: Marcel Holtmann To: linux-bluetooth@vger.kernel.org Subject: [PATCH] Bluetooth: Enable LE Enhanced Connection Complete event. Date: Wed, 8 Apr 2020 01:25:23 +0200 Message-Id: <20200407232523.1013507-1-marcel@holtmann.org> X-Mailer: git-send-email 2.25.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org In case LL Privacy is supported by the controller, it is also a good idea to use the LE Enhanced Connection Complete event for getting all information about the new connection and its addresses. Signed-off-by: Marcel Holtmann --- net/bluetooth/hci_core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index fb210f7ab7ab..d8d543e3dc9f 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -638,6 +638,14 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt) if (hdev->le_features[0] & HCI_LE_DATA_LEN_EXT) events[0] |= 0x40; /* LE Data Length Change */ + /* If the controller supports LL Privacy feature, enable + * the corresponding event. + */ + if (hdev->le_features[0] & HCI_LE_LL_PRIVACY) + events[1] |= 0x02; /* LE Enhanced Connection + * Complete + */ + /* If the controller supports Extended Scanner Filter * Policies, enable the correspondig event. */ -- 2.25.2