Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp488950ybh; Wed, 18 Mar 2020 03:47:46 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvAtXb7QCiM+re8FlH2auptfOxcnP0nZYhmW+APmK9LPIjgKBXL+j359NevUO/ZjMLM0mil X-Received: by 2002:aca:190f:: with SMTP id l15mr2544201oii.48.1584528466082; Wed, 18 Mar 2020 03:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584528466; cv=none; d=google.com; s=arc-20160816; b=wGSDy2s/eBIVceATcEkc4fRUiBnZVaqTBEKIgtOGpwlQrGKuq8F6Hk3bnY1domro9d D9dRwWZMK3+nkjBnezMPwBC38dS4OaH+ZY4MK11FAOrhREnZ83073jEhZGCwdPtBsnma 3E0NysBuPo7ywytgU/kihwVUnuF9wiqkUuKHz4/FVfumMo7/WZV6MSaX29E8G/4E6L5a Hoc7QbaEf/KChpEGU3vZ8EtQZ4aXeXDg19qq1Yqfv15AcozVHqAmlKLVN1pYc+EDcrSu UpgIdv0FWLtPDn+RO8LHLGsPd301/LwkubLitAc76RpdkC9EJaOSF7eih+Ke5jOlQc5L joKg== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=bXQ7MMTikT+H0Zq0NN2bwxYO/PrjoWtdk12rOmFio34=; b=iFIFGuVTlbwtsyjBFBoZ7oAvUVdmI22CkdXzaNPAsjowP7I4bSBzziFbQI1g6UbbCM fBvPHA7a1OLA5+L3G4Z8PzNWF+PTITtt+qu6rfvthR7iI9ZwScsSqrlExUTjAhdS5nl1 Krf/cQbhJ85iee+3NWkY0CbNlUihd5OlCyylWslnStsaP1JFBp3ih34vf9Bnoi6zXPZY Q4FCgI4TI7xUr/DcEVqbgFE/makh0fenwxciEGdgPWEuuK2wehwdSCtSqunSLS2Xum+B O0vCL7+F7AYwyh1RHJfDFQNPOu3DKtHN9U1Vat9tvDUrqrLlRKfSCgUc2e9PETcRzTZV ZUQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ku5hptqp; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6si3300997otq.99.2020.03.18.03.47.34; Wed, 18 Mar 2020 03:47:46 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ku5hptqp; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727041AbgCRKra (ORCPT + 99 others); Wed, 18 Mar 2020 06:47:30 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:35984 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726586AbgCRKra (ORCPT ); Wed, 18 Mar 2020 06:47:30 -0400 Received: by mail-io1-f67.google.com with SMTP id d15so24406507iog.3 for ; Wed, 18 Mar 2020 03:47:29 -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:content-transfer-encoding; bh=bXQ7MMTikT+H0Zq0NN2bwxYO/PrjoWtdk12rOmFio34=; b=Ku5hptqpUlnJ/6IDhwO6bHI/iZeL2Kg2e+DNG2M3Smzf5yLC5MChYKqCVaBXXFJ26F dzQ45iwQBp7Bq16vUW0iyuXzH+4vlA9PEth3mkziCoZhW13xJVXyI9dxNJ9ZW54ZBIBb jMYjMbMJoinEdU/awkdsn9PpGbDlsPDSk5kwiBprbi+569rjVPMcOnwE7cxdENwCEuI6 AefqLH50DEjU0/fzO98BuHF6/hoZJ9TytHejvUCxtgeE3lSN2ime2jl0zwJZ8/rTHfa9 0T562uZo4JUvNoWoe/bnjkGOCqGRQF/CMjKnFKjI5obdNYOG+569mIKOMqfwHbu7zOnX 9D7Q== 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:content-transfer-encoding; bh=bXQ7MMTikT+H0Zq0NN2bwxYO/PrjoWtdk12rOmFio34=; b=b24ZHaAdxeBX/yICMfp6zc36voHKNUwX2ArCgnOTIvBvwnXtxV4Pu3rVSUPARQyBuB LsqEMBnzkPil9Y+KCCrV8yRfyesPjp/1qS/tuPMYDWdBbd8EZ4gy3JQp9FWLpFaf7G// NzefeV9PQmqoWuyTcSh7pF8zZk98eHJwtVgJA2ZhlZwLfYxkF1tVlSzcAqA/A5HvMBLU mp0EQNAl7vDhKPH5hcP+P8Bs80z+cm0LcF84THr3f7mzt8Hc4SLXk5Eb3w7mKjX+ye+U RL1QolOb4ZRcvq7aGl+DILXDs/Ffmr1SdUkplbWkR/7WUfwpogfcPZaVKLlrDUk03Irl Shdw== X-Gm-Message-State: ANhLgQ2nF3dwawib/tEx/hGnWrmmTHNk42BBtcQLILN9vx1L9CE0+ycK QnTpviPJem1Ajisx88Nph1lzFBLbhLYHSPesUbo= X-Received: by 2002:a05:6638:3dd:: with SMTP id r29mr3585840jaq.94.1584528449212; Wed, 18 Mar 2020 03:47:29 -0700 (PDT) MIME-Version: 1.0 References: <20200312100754.3445-1-sathish.narasimman@intel.com> <20200312100754.3445-2-sathish.narasimman@intel.com> In-Reply-To: From: Sathish Narasimman Date: Wed, 18 Mar 2020 16:17:17 +0530 Message-ID: Subject: Re: [PATCH 1/7] Bluetooth: LL Privacy Delete Store Resolving list To: Marcel Holtmann Cc: linux-bluetooth , Chethan T N , Sathish Narsimman Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Marcel On Wed, Mar 18, 2020 at 4:12 PM Marcel Holtmann wrote= : > > Hi Sathish, > > > This patch help to delte the resolving list stored in the BT > > Controller w.r.t BD_ADDR. > > > > Signed-off-by: Sathish Narsimman > > --- > > include/net/bluetooth/hci.h | 1 + > > include/net/bluetooth/hci_core.h | 2 ++ > > net/bluetooth/hci_request.c | 33 ++++++++++++++++++++++++++++++++ > > 3 files changed, 36 insertions(+) > > > > diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h > > index 5f60e135aeb6..352bc43940ff 100644 > > --- a/include/net/bluetooth/hci.h > > +++ b/include/net/bluetooth/hci.h > > @@ -457,6 +457,7 @@ enum { > > #define HCI_LE_DATA_LEN_EXT 0x20 > > #define HCI_LE_PHY_2M 0x01 > > #define HCI_LE_PHY_CODED 0x08 > > +#define HCI_LE_LL_PRIVACY 0x40 > > #define HCI_LE_EXT_ADV 0x10 > > #define HCI_LE_EXT_SCAN_POLICY 0x80 > > #define HCI_LE_PHY_2M 0x01 > > diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/h= ci_core.h > > index d4e28773d378..5f04ef88da35 100644 > > --- a/include/net/bluetooth/hci_core.h > > +++ b/include/net/bluetooth/hci_core.h > > @@ -1657,6 +1657,8 @@ void hci_le_start_enc(struct hci_conn *conn, __le= 16 ediv, __le64 rand, > > > > void hci_copy_identity_address(struct hci_dev *hdev, bdaddr_t *bdaddr, > > u8 *bdaddr_type); > > +void hci_req_del_from_resolving_list(struct hci_dev *hdev, u8 addr_typ= e, > > + bdaddr_t *bdaddr); > > > > #define SCO_AIRMODE_MASK 0x0003 > > #define SCO_AIRMODE_CVSD 0x0000 > > diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c > > index bf83179ab9d1..f4bbd3b79210 100644 > > --- a/net/bluetooth/hci_request.c > > +++ b/net/bluetooth/hci_request.c > > @@ -885,6 +885,39 @@ static void hci_req_start_scan(struct hci_request = *req, u8 type, u16 interval, > > } > > } > > > > +void hci_req_del_from_resolving_list(struct hci_dev *hdev, u8 addr_typ= e, bdaddr_t *bdaddr) > > +{ > > + struct hci_cp_le_del_from_resolv_list cp; > > + struct hci_request req; > > + struct bdaddr_list_with_irk *irk; > > + > > + BT_DBG(""); > > + > > + /* Nothing to be done if LL privacy is not supported */ > > + if ( !(hdev->le_features[0] & HCI_LE_LL_PRIVACY) ) > > + return; > > + > > + if ( !hci_dev_test_flag(hdev, HCI_LL_RPA_RESOLUTION) && > > + ( hci_dev_test_flag(hdev, HCI_LE_ADV) || > > + hci_dev_test_flag(hdev, HCI_LE_SCAN) || > > + hci_lookup_le_connect(hdev) ) ) > > + return; > > please don=E2=80=99t invent your own coding style. Follow the netdev conv= ention. Sure will correct the coding style in next version of the patch > > Regards > > Marcel >