Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4451515ybb; Tue, 14 Apr 2020 07:35:37 -0700 (PDT) X-Google-Smtp-Source: APiQypIN7chfmxTfbNiy31WqOaRUbOqdSPnwIRHoGhlETiMvFezp6VOh8nUI6q37IgViV7ZdtJkM X-Received: by 2002:a05:6402:207c:: with SMTP id bd28mr18294927edb.380.1586874936759; Tue, 14 Apr 2020 07:35:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586874936; cv=none; d=google.com; s=arc-20160816; b=gGZLcI5SnmfDi7Kbw/ZS6NHA/9/7ylI9iey/pjMkK2QE7nN9CitBIC7TyJjWE+N0++ 4QIBLXGiw5atLykTkCW0eyRaMw2pQIwYQY6DnB0e6TfT/ay5l8e4oFbuWoKh1NxT66Bh 6CNIO4FMrkYKfCR7HyDoJCHKUTMTbdW4WPLJIV1h1leCD4Bvs+lUN3owBXo0LRMSDDO1 xoOmWiwPakgo+ulaW4lncmYkm8w4FVJtjQW8ziPIMEVfY/1jZR98fi+/BQ8wbFbAdJSR mUyB9pRnBhKWa9xdBp5nEl1sMVDeAesL5bGfBeBfFMquIm7+E0gqISQ47rFHFp6ShG7l nWbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ScUW+oHrbgi3JWOg1Fgyv4znG7u4C+rqTqGYloCdaHI=; b=pZaM5FH4LxxOqDr+yqaTTNfjGiz/sTF3qkBSlpvhx/Sihb/3i6Bix62zwMPmc7przi pVEsd7F13RKF36LulWlU+QHEtXgBvWAo9SVQIiNEckXtgchGYrc/PW7w+Oejf1+IzGSl jsq70D44Pe1UjUnwAspclpMRYJ7unoles3IvRrGjjWkARBoRVGrPlkK4qeA4x08K6yEA XYap7YmWGbptGrkyiYQkPsQNIGwHRZO07dDx0whwDFUQ3fO70c5oJ2tctsBMI+aI3jYM 0eHVLRFmjylzB3Vcvn5dS/jF3fUnzGAlKI/tqCbXoSsXLhNVXAIxa6en7wXyHHxnFiY9 pALA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=blsedS6y; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si8366235eje.311.2020.04.14.07.35.11; Tue, 14 Apr 2020 07:35:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=blsedS6y; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729271AbgDNGtq (ORCPT + 99 others); Tue, 14 Apr 2020 02:49:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728133AbgDNGtp (ORCPT ); Tue, 14 Apr 2020 02:49:45 -0400 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD5A5C0A3BDC for ; Mon, 13 Apr 2020 23:49:43 -0700 (PDT) Received: by mail-io1-xd44.google.com with SMTP id o127so12147551iof.0 for ; Mon, 13 Apr 2020 23:49:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ScUW+oHrbgi3JWOg1Fgyv4znG7u4C+rqTqGYloCdaHI=; b=blsedS6yvApc63DBWz6J9Xlp6Si30n4aUNoRdSDYLfCv4r3mFyf2cetul9zOh72YIh wro1yaT64aYaT9gWUwSxS2sZ99ku4squQkjplWHaeED8HrM9Bf1mrYJl8ah+ck81z871 JpycMkgpyRG+vJqjyI9NtV0Z8R56/pkkS97uOo7jhnOhhQU4KvE/odwieUTkJOPi1EiT t6eAeBdnEqh5XWc04S6DDNQ1nr19UoGpYyFe759G/f2EGBDzVL3zesqbrOHfLPb1d2Qf phU/8ogc1qGd9jc+CCjOVfhZaQatGZpAobCvpYLEshCubFHrNVT1/DqLHDax+DrFwpng PW5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ScUW+oHrbgi3JWOg1Fgyv4znG7u4C+rqTqGYloCdaHI=; b=pBj0tDIkCQ1kWWXlsow1ZcMl+WHNHg+cEHR4bBhi/so3oU9ZBwl+pmrb8ZMjtIKXRF phUe2sWBH1lJWQBx+546bL92FeKuiSj2UTjxUoaExD+zxYqDmMhJkUzxd3pyzb5P+yWY SDJ5fWkIWsE77D65js9M8ihoR0j90FQIcgVgV5pKpNwCDZvx8idj6YCFAuym2hc7jk75 wJa336G4Z6bI/k6+SZFYX11Wn5EET6AbHi83N0tHXXsg4cfeTVkpMpoCE5xNHVNKwJvP V7qPEJb+H6hjDQZzhOjRI2vhtiJNskqqNxFqBEO7TYQ/10/xPK1b+a/uk6kC52kinHxu /wdw== X-Gm-Message-State: AGi0PuaFBPmdt0QcObSAVqwTLHMWUcubKyzJQHlwwbVy/L/YYVqHS+MK vFtQrWxfAPmSLeLvli30aOSRqUcFRACLbfZWJVUvopTsJBWSlg== X-Received: by 2002:a5d:940d:: with SMTP id v13mr4447311ion.1.1586846982888; Mon, 13 Apr 2020 23:49:42 -0700 (PDT) MIME-Version: 1.0 References: <6b6ecbf19559cb16793d7ef3e96c1181a32b4df5.1586412226.git.marcel@holtmann.org> In-Reply-To: <6b6ecbf19559cb16793d7ef3e96c1181a32b4df5.1586412226.git.marcel@holtmann.org> From: Sathish Narasimman Date: Tue, 14 Apr 2020 12:19:32 +0530 Message-ID: Subject: Re: [PATCH 3/4] Bluetooth: Enable LE Enhanced Connection Complete event. To: Marcel Holtmann Cc: Bluez mailing list Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Marcel On Thu, Apr 9, 2020 at 11:38 AM Marcel Holtmann wrote: > > 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 > --- > include/net/bluetooth/hci.h | 1 + > net/bluetooth/hci_core.c | 8 ++++++++ > 2 files changed, 9 insertions(+) > > diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h > index ff42d05b3e72..1da8cec8e210 100644 > --- a/include/net/bluetooth/hci.h > +++ b/include/net/bluetooth/hci.h > @@ -460,6 +460,7 @@ enum { > #define HCI_LE_SLAVE_FEATURES 0x08 > #define HCI_LE_PING 0x10 > #define HCI_LE_DATA_LEN_EXT 0x20 > +#define HCI_LE_LL_PRIVACY 0x40 > #define HCI_LE_EXT_SCAN_POLICY 0x80 > #define HCI_LE_PHY_2M 0x01 > #define HCI_LE_PHY_CODED 0x08 > diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c > index 589c4085499c..0d726d59a492 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 > https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/tree/net/bluetooth/hci_core.c#n717 I see LE Enhanced Connection complete event is enabled here. Regards Sathish N