Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp813817imw; Thu, 14 Jul 2022 11:13:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t+dSV+0OmNvBPIGyqO+Q9YN2LinAzjRMNzcG6a/PiO8Mbpbo1fMtLT9BXH7JDEDVMq3vmz X-Received: by 2002:a05:6870:891d:b0:10b:95e3:3d8f with SMTP id i29-20020a056870891d00b0010b95e33d8fmr8026573oao.54.1657822419818; Thu, 14 Jul 2022 11:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657822419; cv=none; d=google.com; s=arc-20160816; b=W/G6ZJQKe7DiBJRmAdlgNUrA5R/+xNoJMpPrLUsaakuO9ppvCADeNMST8irO2D5X2G iLNhdSwAhgDyrqXZNyu6yYZSSyD2hmaGDgFPNJ2eqbOgS3QTtVCIVZR2WCo6WU26i6fz 6RFU/08k/FNn3XCIsTEr9EwvKZvK77MIUgY2mPduRJaVPZ6KOT+GrRX4VgHOJVE8rpqg ZcXqkEYssiLTFLqfzWSqBbsp+U8D1FNaOnV7lQk6qrdWcjIOA240hQ+V52NKLcvfQDtt VGg68PtPIYAlOac3W0njkgFBAq4W6TGHHxJZ2kJ2bXmG038dXojRkJycXgqWhCXpOpDR 4TkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=b4xVFVSEIg+FQbYqtvkofSb1Qt8mWH5Xuxpasnfdit0=; b=fXBamDCxeoMlLIIaXljnEynHapILuH1Wx5K+unbE9rKkTR4RrZNiZtepXO2gucHn1T xmUR6/TQ93TamXH41H4kAjQCYRS+7a3LKHMaiVMCaJjqaEzxdQ11S91d1tiGxrDwWdWr hBnbF+00YOZLkbzQM6cOGBnVIyVOT6Z4xNKNahzxQc16zrG+DcT0FIVH9DYkq1ZMjWRj aYveVS0hy1epPe/gH/8mHM0wW4R5Vy/tSBTynYknPd3Y6/Kt8TTYuLVcFpXP8NbfD0Pv Udd4Wxp3rHsLu8/Bley3ReTXy0Gkdp5+uPSEBL2OMa6M2WB7Nx7BOROPoAa1K6AcPMlb g97w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=h5gsb1qE; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c8-20020a544e88000000b00335251db61asi1927235oiy.178.2022.07.14.11.13.26; Thu, 14 Jul 2022 11:13:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=h5gsb1qE; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S240549AbiGNSM3 (ORCPT + 99 others); Thu, 14 Jul 2022 14:12:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240548AbiGNSM1 (ORCPT ); Thu, 14 Jul 2022 14:12:27 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A709968DD1 for ; Thu, 14 Jul 2022 11:12:26 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id i8-20020a17090a4b8800b001ef8a65bfbdso3872392pjh.1 for ; Thu, 14 Jul 2022 11:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=b4xVFVSEIg+FQbYqtvkofSb1Qt8mWH5Xuxpasnfdit0=; b=h5gsb1qEPujbWQrhBNlWZ2UitjQpX0QQDMADPaJevp8aWh9pgabRVNV+SeSyvecfB+ 4hJ2ai4KYAcTYmbVkSaYjqy+lQ4GhD4mCr195YHYppfaz854xtYwnbZEggbGfYCGF3bn 5QFu3rddlnpQvnkl51EShSVj/PFtK9iBJI0sPXmTnzG2Q9QgXeBD4XNdED3YejWudVeH HBc5OKYDq5TNwE5MVUAD71+lgAQ069C8Gz+95JKakBYrigDSQeFF4iFwAvhe5Yu4FvHc gWfVTDFzRNpWK9GlVqw9nT8PNWEj8aEPJ7ecCRoZo6WAwitb6wASuTiwKm6sk3zWORwt jTLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=b4xVFVSEIg+FQbYqtvkofSb1Qt8mWH5Xuxpasnfdit0=; b=Sr5CfUlcqhD8hTLEwhZIcVnrgcs4z9wCPKzJqT4MidhQbsDtbwwxCsxsMSG/LvWUsL PV4dZP48EHTW3/YlNJfy2sqlvl6gDMIQ/jFBKp/9HCmHswU+z9FZNE/R4TfDlTgvNErd pMWzl/Kw7oPLSgCK2WIDQJK55E71Afx17gn7R5aF2nZaLu6WrRqxwdvTzRnAXTkYIllo QUWAm/u5JDYkaDU2/bMQXoj6qrBKRd/gOkZWDItSeBXphy+jIB7hzy8CCDBM5l4aXuxZ Os2vfrdUyEDte6srQ2PEfWIs+BJS/GeGewNILhmYyn+7wWIGe/SqZuFJGhvjqCL7k12x ATlw== X-Gm-Message-State: AJIora+mzJ0tZJEfbOikm/S1Fwuc1ODrN8lU33I82jjzVxZoKtw/KOIp +tIMuhoUWHYH6UlO9PE7jliuPumbRDo= X-Received: by 2002:a17:902:b694:b0:16c:29d9:7308 with SMTP id c20-20020a170902b69400b0016c29d97308mr9664222pls.110.1657822345648; Thu, 14 Jul 2022 11:12:25 -0700 (PDT) Received: from lvondent-mobl4.. (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id l4-20020a170903244400b0016bf24790e4sm1833145pls.21.2022.07.14.11.12.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 11:12:25 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v2 1/2] Bluetooth: hci_sync: Fix not updating privacy_mode Date: Thu, 14 Jul 2022 11:12:23 -0700 Message-Id: <20220714181224.3793757-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz When programming a new entry into the resolving list it shall default to network mode since the params may contain the mode programmed when the device was last added to the resolving list. Link: https://bugzilla.kernel.org/show_bug.cgi?id=209745 Fixes: 853b70b506a20 ("Bluetooth: hci_sync: Set Privacy Mode when updating the resolving list") Signed-off-by: Luiz Augusto von Dentz Tested-by: Zhengping Jiang --- v2: Use HCI_NETWORK_PRIVACY instead of 0x00 net/bluetooth/hci_sync.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index ca97378fd81f..256ece5640b7 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -1636,6 +1636,9 @@ static int hci_le_add_resolve_list_sync(struct hci_dev *hdev, bacpy(&cp.bdaddr, ¶ms->addr); memcpy(cp.peer_irk, irk->val, 16); + /* Default privacy mode is always Network */ + params->privacy_mode = HCI_NETWORK_PRIVACY; + done: if (hci_dev_test_flag(hdev, HCI_PRIVACY)) memcpy(cp.local_irk, hdev->irk, 16); -- 2.35.3