Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp17124pxx; Wed, 28 Oct 2020 16:43:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzh3MfN0mNfuKaAOyIrLBDG/3r9Hpjd6DT9nD6IjFbeXHiYRc5elMnZohKKzBHXR1HZzFgi X-Received: by 2002:a17:906:f0ce:: with SMTP id dk14mr1487432ejb.539.1603928611567; Wed, 28 Oct 2020 16:43:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603928611; cv=none; d=google.com; s=arc-20160816; b=XAgFC5v5htfSBP2qL2K38dL8euP7jUVA5MWtthJoX4fg9xZY4H00T5l+V2bj4nqmnj zdeMi07azJ02PYCHEUtWPM8I67sHKXTX3U+aNpkB0fUOYtZ/mm4ysAbBpCcUxGYFUjaM Rj60M/8Hitv9s1n80AMch7I0TXTe9n2Zzqujqu+Qx1fkXGXHxkndR2zFMnOg95L/o5MI GVe2jQTNMCAa0VYFldBMh9HurAC7NUItlvPq9PH+RaOpoeup1p5RsPm+3WRP+yQ08qCp 9Z6hOlFcz5mDXu/kMo2YdC+I3hzvc7YxHxISUeYQDF6Mh55ozfH8RVZrii7lshl6J8hv g3CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ztIBTxTOCqVSao9pMJM3OJrR4WGp4y7BufKyjyEK6BY=; b=PIfQRmDaqM5Xt/A+ManWigMuD6JNLCO5M1+KgEiWU+pUn9cckR2KIYOxpuLkFtuXjb +iYig58Xt5j6Gr0E6OTEl93wi7wIf3/s1wxpAl9QFEjZw5CPJ/gKd0p5u9C6wJJ/js3S cEaW3bSHhpnnN3kQbbteXZGSu/hydTTTdSMJL5mjnhywEy8/P8/fjrcFLcvuHrIiWR05 7Vwb6/WD1jXWx7RnJ1s3bJkRM1xNXbxvMnXtbKpCoUd9eLr0yU8qTeIJKQAouVV/p1vd +84lYuQPlFx/h84Xw8f3hWSGh6hOZAYq8te+GkaxCw60PcTt3R3UwddxqiqjtCabWJS9 wILQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GC8ILkXt; spf=pass (google.com: 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 o60si773927eda.61.2020.10.28.16.43.05; Wed, 28 Oct 2020 16:43:31 -0700 (PDT) Received-SPF: pass (google.com: 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=GC8ILkXt; spf=pass (google.com: 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 S1726513AbgJ1XmV (ORCPT + 99 others); Wed, 28 Oct 2020 19:42:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725968AbgJ1Xlu (ORCPT ); Wed, 28 Oct 2020 19:41:50 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A31D6C0613CF for ; Wed, 28 Oct 2020 16:41:50 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id 15so803692pgd.12 for ; Wed, 28 Oct 2020 16:41:50 -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=ztIBTxTOCqVSao9pMJM3OJrR4WGp4y7BufKyjyEK6BY=; b=GC8ILkXtp+MRlJWpDOA/BSY4ey3n/pFoVmRRfZMmevVIsg6CkGqxBV+3mnUgSDtT12 FbMTwWc94OveYhP+nORDTYgNV/wtIgAGGoURDw5UcPn2xHi9H317N3rjdXI44TAJxHYh QGxd2STPBJBNNjs+h2bVYgzOlAVCJcfHU57J5rKs8XzgaFUdbBz5EdvGK4QETOrcn1N6 gP7q2HicU28fk05VtOU/KNa1eTAYidHPgS9uWcoa7KSvIJlRAngheHzcdPtKxG+aKIVq +HI89U8XQJe+mfpBPzWj1d4qSX4puMCmwfIbBtdENbSYd5rQVgzyks1GTsv9w/bnoAPn yGaA== 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=ztIBTxTOCqVSao9pMJM3OJrR4WGp4y7BufKyjyEK6BY=; b=h5ma2mfREnKZVccAb2qiHRpTq3tn1P1wewUw3bh0hAArW3zhk1JZ+oko2AFkz87YP9 79J+SI0/pcQt0iHMugTOS2vsHUtFPDDAsIuuLEwAq0467JYlqMcC5DKIwEKQZ4etLF39 YoiR9tWRkm3p7su4hvWCYlqUT3zWrsPFAuJ7nTqhKnPydeSHd71PqoY7LU0t30ktP21l RXgVkw+FX+sgvI9PZBfkIIwJ7958RrBzHObMkNyyK+Bz5pNcZ52PCWMMh9P0VUYlbTls CHmW/UNbWfE+AWFnzHVT6l1/HrcLLdqpfQxOd/KyiiiIXYN8krtp/3x52EbqW9hd7LvJ +vaw== X-Gm-Message-State: AOAM533YzDy5JicPSqwfjAM5FivMzSQqUHUQcjd1kypcoJBLqsYud1SR U1jumTgTDEnDGNShUH75qK2dFBM0Bes+wrr9AdlMy9OyVAC0Rg== X-Received: by 2002:a6b:f610:: with SMTP id n16mr4960911ioh.103.1603863062431; Tue, 27 Oct 2020 22:31:02 -0700 (PDT) MIME-Version: 1.0 References: <20201022082304.31757-1-sathish.narasimman@intel.com> In-Reply-To: <20201022082304.31757-1-sathish.narasimman@intel.com> From: Sathish Narasimman Date: Wed, 28 Oct 2020 11:00:51 +0530 Message-ID: Subject: Re: [PATCH] Bluetooth: Fix: LL PRivacy BLE device fails to connect To: Bluez mailing list Cc: Chethan T N , ravishankar.srivatsa@intel.com, kiran.k@intel.com, Sathish Narasimman Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi On Thu, Oct 22, 2020 at 1:47 PM Sathish Narasimman wrote: > > When adding device to white list the device is added to resolving list > also it has to be added only when HCI_ENABLE_LL_PRIVACY flag is set. > HCI_ENABLE_LL_PRIVACY flag has to be tested before adding/deleting devices > to resolving list. use_ll_privacy macro is used only to check if controller > supports LL_Privacy. > > https://bugzilla.kernel.org/show_bug.cgi?id=209745 > > Signed-off-by: Sathish Narasimman > --- > net/bluetooth/hci_request.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c > index 6f12bab4d2fa..610ed0817bd7 100644 > --- a/net/bluetooth/hci_request.c > +++ b/net/bluetooth/hci_request.c > @@ -698,7 +698,8 @@ static void del_from_white_list(struct hci_request *req, bdaddr_t *bdaddr, > cp.bdaddr_type); > hci_req_add(req, HCI_OP_LE_DEL_FROM_WHITE_LIST, sizeof(cp), &cp); > > - if (use_ll_privacy(req->hdev)) { > + if (use_ll_privacy(req->hdev) && > + hci_dev_test_flag(req->hdev, HCI_ENABLE_LL_PRIVACY)) { > struct smp_irk *irk; > > irk = hci_find_irk_by_addr(req->hdev, bdaddr, bdaddr_type); > @@ -732,7 +733,8 @@ static int add_to_white_list(struct hci_request *req, > return -1; > > /* White list can not be used with RPAs */ > - if (!allow_rpa && !use_ll_privacy(hdev) && > + if (!allow_rpa && > + !hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY) && > hci_find_irk_by_addr(hdev, ¶ms->addr, params->addr_type)) { > return -1; > } > @@ -750,7 +752,8 @@ static int add_to_white_list(struct hci_request *req, > cp.bdaddr_type); > hci_req_add(req, HCI_OP_LE_ADD_TO_WHITE_LIST, sizeof(cp), &cp); > > - if (use_ll_privacy(hdev)) { > + if (use_ll_privacy(hdev) && > + hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY)) { > struct smp_irk *irk; > > irk = hci_find_irk_by_addr(hdev, ¶ms->addr, > @@ -812,7 +815,8 @@ static u8 update_white_list(struct hci_request *req) > } > > /* White list can not be used with RPAs */ > - if (!allow_rpa && !use_ll_privacy(hdev) && > + if (!allow_rpa && > + !hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY) && > hci_find_irk_by_addr(hdev, &b->bdaddr, b->bdaddr_type)) { > return 0x00; > } > -- > 2.17.1 > Gentle reminder. Seems Many devices are failing to reconnect after every on 5.9 kernel This patch will FIX the issue Regards Sathish N