Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1004220ybg; Wed, 3 Jun 2020 21:05:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5N2QdnjHNe2+M1TYmaQtCqdOsclb8WpmArqzdhoRHu6uGqRrB9kQwbSohfl8rI/Y8Khog X-Received: by 2002:a17:906:c1c4:: with SMTP id bw4mr2171458ejb.452.1591243554532; Wed, 03 Jun 2020 21:05:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591243554; cv=none; d=google.com; s=arc-20160816; b=t3r3ZMp1lWsOCwFaqvnvf/snQEzKnIpt6rnYBaPil0htiH81em2OMLkD7mHqUcB+xG 7MvO7Zhw7nEXd6BeQN+cLWWzf5nd6NpmmwsfldU/sgly1J6ZV7Eoch804gL+62tjNt7Y KAbstXyLj9VP0cAQLRemFde0lEvUjIa//1KDEkBpjbc9th65WNAxr7lpG3nWRx3orz6N PKJSuKo5TdoerahvR0K/j9lz0WGr8oBCr0WXN7EixbIqLWFxzFog1RAujxUxPLxSgL/Z umWOG6A+VNbjlgtyJDX6CoRpG2sQvSB7mkbq/0wR3IZvoADHL9sk7HXKNtwBwC744Wci SaYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=6CBbZ9r4eSiZUUGFyvEEYED4UFptLRNF6sdTCpICb7Q=; b=Of369wUuxf6SbPrchBuO3ya831n5L2C4xHwoaD6t61mlXIisSpgesB5ZMiiA+W6cxZ mqitQrGpOibZIzF3SE/vHl5wdK38sOxZl8I2t3kxLw52kNN/TLk6hb48m132L3NUXiT4 xPFnGbVOBmU4ESPDi/UfIbq2ZEbxM6CeBhPghVEHVzXAyIH/vtOZk6US43hu2AQqguMd g1Au+xO5zaAifHgnxQOxNYpaht8D6ijoqPdZtJ4NbCCEdnB0gF9G2iMtx7NdNUu9EzXM /w/3q91d2XGKiZtMY1gHowJL+mNWaw9ilFN4snaU63mRWJOPbnRVQ9mGJuhkzhjkcsXG xBFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G6z7LJXq; 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 cz19si896547edb.40.2020.06.03.21.05.30; Wed, 03 Jun 2020 21:05:54 -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=G6z7LJXq; 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 S1726004AbgFDEFY (ORCPT + 99 others); Thu, 4 Jun 2020 00:05:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725936AbgFDEFY (ORCPT ); Thu, 4 Jun 2020 00:05:24 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCA11C03E96D for ; Wed, 3 Jun 2020 21:05:22 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id 5so519643pjd.0 for ; Wed, 03 Jun 2020 21:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=6CBbZ9r4eSiZUUGFyvEEYED4UFptLRNF6sdTCpICb7Q=; b=G6z7LJXq1yMGvzasIcDqLhMRmS1B7Lt2UBo3R6TzlQYTaS8nw/C6mFjucuFGQhzBgK zkYQcfD7vgo3urDKr6P5+7fhPDGPTwXhaNvpeax9LtqpyuXhKKcoa8kVBtrXBBgDJEs3 9IleOAWQAgN/EVgbLCgUPn0xFon3pnNjR+UkG50C9xgu4O1bvyxHydGxMT7JMwnZZRzL SVRNsUJ+6xOOUH2XEhm9whFAKkEkENA7Q0zlDyd5h/lb1mSxsP1TA53/IP3wrC7E48tM c1/DcGihQQT1+o72MmMhzI4QHGyNVDdUXPIsZNjxcy1xc62NAy5QWkr0T2u91y3zUV+4 5syA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6CBbZ9r4eSiZUUGFyvEEYED4UFptLRNF6sdTCpICb7Q=; b=hTdz5Fe5zokQQC6oYJMusoDsft69coHCFFKCzus4hsLRS6NmxkkwXAjklQxi2nzhU4 xcU7a+NCwAPw6TDl9I9a3/Bd4CYgqKSb2vSwwhcnExctBio0ckOtJ9pudG4sDP5ZMuNp jkrB4Nz9DxvwItdTitBCD6J+MSM5TYDYCW8Sy1zimjvqQdaV8WZA7ruEd8HMhdneF7Ll XbI/2hwyLb7c+VksM0YdvmFyqw6SeJg5MMkl/D6PdWrckcqIVHiiMqRAS1nGhTIG6LDi G5QJqfMuAIeOIzXrQUwUnACIj+gYsqcynZ0h96gNaGaHiMVcz4LE0Bvx4sa/na1SD731 EdLQ== X-Gm-Message-State: AOAM530IjpOlCpB53041rE64jNMeABjdv09ZNfvzeUMFP3oEEVmQBlE2 2eUfYp2Br0q7WCDg0i59yblUFKdXqOI= X-Received: by 2002:a17:902:eb03:: with SMTP id l3mr2912522plb.49.1591243522003; Wed, 03 Jun 2020 21:05:22 -0700 (PDT) Received: from nsathish-Latitude-7480.iind.intel.com ([134.134.137.77]) by smtp.gmail.com with ESMTPSA id z9sm3700683pjr.39.2020.06.03.21.05.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2020 21:05:21 -0700 (PDT) From: Sathish Narasimman X-Google-Original-From: Sathish Narasimman To: linux-bluetooth@vger.kernel.org Cc: Sathish Narasimman Subject: [PATCH v2 5/7] Bluetooth: Let controller creates RPA during le create conn Date: Thu, 4 Jun 2020 09:38:44 +0530 Message-Id: <20200604040844.13386-1-sathish.narasimman@intel.com> X-Mailer: git-send-email 2.17.1 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org When address resolution is enabled and set_privacy is enabled let's use own address type as 0x03 Signed-off-by: Sathish Narasimman --- net/bluetooth/hci_request.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index bcd64dec9989..6e1036cc8b1e 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -2183,7 +2183,13 @@ int hci_update_random_address(struct hci_request *req, bool require_privacy, if (use_rpa) { int to; - *own_addr_type = ADDR_LE_DEV_RANDOM; + /* If Controller supports LL Privacy use own address type is + * 0x03 + */ + if (use_ll_privacy(hdev)) + *own_addr_type = ADDR_LE_DEV_RANDOM_RESOLVED; + else + *own_addr_type = ADDR_LE_DEV_RANDOM; if (!hci_dev_test_and_clear_flag(hdev, HCI_RPA_EXPIRED) && !bacmp(&hdev->random_addr, &hdev->rpa)) -- 2.17.1