From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C19DC43334 for ; Tue, 7 Jun 2022 17:48:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348307AbiFGRsI (ORCPT ); Tue, 7 Jun 2022 13:48:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347716AbiFGRa7 (ORCPT ); Tue, 7 Jun 2022 13:30:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 543B511AFDC; Tue, 7 Jun 2022 10:28:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4DC3F6141D; Tue, 7 Jun 2022 17:28:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DC9EC34115; Tue, 7 Jun 2022 17:28:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654622882; bh=rV5ATrQzgw5+uUp6EFkXrz+X1dUuzqSLwh7plizy/QE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pnHENhbC43+mtaZ72JtOnD90KJvvB6jjDvgshI9STmD2V2VNiYd1me87Tehzrt7yx /6mUAs8CmO/+V0fkPfnXnDjMjIQ49KlS1AS8Mqf5bRo5SwuAoT9gakcQI39r5423q/ aD0wf0DDZSIC+BiERSMtDA6Ulqkz596B+CCxxuwM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sathish Narasimman , Marcel Holtmann , Sasha Levin Subject: [PATCH 5.10 218/452] Bluetooth: LL privacy allow RPA Date: Tue, 7 Jun 2022 19:01:15 +0200 Message-Id: <20220607164915.057399563@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sathish Narasimman [ Upstream commit 8ce85ada0a05e21a5386ba5c417c52ab00fcd0d1 ] allow RPA to add bd address to whitelist Signed-off-by: Sathish Narasimman Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin --- net/bluetooth/hci_request.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 2405e1ffebbd..eb4c1c18eb01 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -842,6 +842,10 @@ static u8 update_white_list(struct hci_request *req) */ bool allow_rpa = hdev->suspended; + if (use_ll_privacy(hdev) && + hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY)) + allow_rpa = true; + /* Go through the current white list programmed into the * controller one by one and check if that address is still * in the list of pending connections or list of devices to -- 2.35.1