Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1299663ybh; Thu, 23 Jul 2020 05:38:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhyGHF7TIELueGv2X3vZyyejM1BUB3uuZCYenOSSTVYS6F84HmvIFFUUikrgy9NYTeuJx3 X-Received: by 2002:a17:906:1751:: with SMTP id d17mr4099119eje.140.1595507906741; Thu, 23 Jul 2020 05:38:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595507906; cv=none; d=google.com; s=arc-20160816; b=awWb7iMlawyYYtyObdg7zImbUG/ANrC0vJWXIyZ/YVH65iElS/dotwwzgIRPnykz3q vP3po6dozYpPeKNxRCTM25WK6vULuPxFAURMtKFE4S1nvLEDcNU/A4yMarNlevl8oYrc mVre9GREjSi6j5H2eitck6AV5HxO2LYnpYsA/b0qJR3009TCwS0N5aQ3+0oUPxrGhIXZ RbuQb9KxS65IebhXHSdpT3hN67yqggiaDmL7t6eVPMR7ExHQp80SqRK9s6EveCjDBUpm C/OYCZOr3CmR/u6ZL+pAfY7vfg2ylwpfBbe2ve5SImavgNy/pa04/YryVpsb8B29RjA4 B9jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=6RSAZAZCD/2zvtqQwxc8kimw5YBb8FQUpkwthAppgoM=; b=FSOQaPkEWZ6bQE4HRTkMwba2mAaP8+tsVomncEy/7zii6zJm/IbcuO5xkVNZ+Xl1LL cTAW8mGddzlBjwTZWqEIawZBnw/0sogH9OgfvnBnRCi4Hg4c6XU3D05rJVM2dele2mUG cViPTa3x/V8ecgGC5xxmuoy3g4/QdIoc04BYL/iDCaS4T5Tu+BF9WEaQcYajUUo1Yvbs IVMg+4A0P6Xjl4cKnrD30ye12CsuFV7jxPwjFR5OhrGbD1ET+f6ZylRVBpmAzo27GFfk 7ioVgbsz5rvax6EKQ+AcX5QJpmtSuqhBPYicSXP5AEQTLKwQEuZVFwNaExp8gPfzbf1x tiMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qal8nDsq; 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 z16si1862839ejw.386.2020.07.23.05.38.02; Thu, 23 Jul 2020 05:38:26 -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=qal8nDsq; 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 S1728794AbgGWMf3 (ORCPT + 99 others); Thu, 23 Jul 2020 08:35:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726109AbgGWMf3 (ORCPT ); Thu, 23 Jul 2020 08:35:29 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75D0CC0619DC for ; Thu, 23 Jul 2020 05:35:29 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id 72so2507329ple.0 for ; Thu, 23 Jul 2020 05:35:29 -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:in-reply-to:references; bh=6RSAZAZCD/2zvtqQwxc8kimw5YBb8FQUpkwthAppgoM=; b=qal8nDsq0om4u2aaDE6pcQwPdv763EX+ngNdNXdmJc/QkMTCc4pM3LoKF2mUiPaav8 4TfWVAAnVYwmrKRrYWcLAo8LQum3tq1iq8cOt0SgpntLPpz4g/t86iO5QXTasYYUrEK2 WZKpCQvaJgwShVkNlilQBh/mQSIjVHEkYnSi858k81NGVYECAfmTASzCJRd0unb6Pn1B 7QCKT+nNCRNO3tvKkypFdBhYDDZoqr0cT3UG9hOZJzpF8++19hIIV0XJU/einrC8iv9F oSQfUM2Dg6zAfOGJ0ralWP8prXhi4IsXpmwuTabYHmC52WVki0u8wMHxh014pk/2t+R+ wlqw== 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:in-reply-to :references; bh=6RSAZAZCD/2zvtqQwxc8kimw5YBb8FQUpkwthAppgoM=; b=AwYc16AyqNs4IDscbTIs68w3oGUbKQyi4FrFZKx28BX3/ADwXcOt9xC+9dINc19hjS LchmpVLM5oFBXgflWrSY2a7+iVk5oUgjckbg8BVxNeZXMM9DKEyG5fg0U/0kWOz3xCly lrF0V3sbPHs7S1c1ogY4EweaBCGQk2v43RSsX0t/C86zhUiKHJwvROLnI5S93y/XnUd6 Cg94jS0UOVcleDJdxsLhNAPvdw2xICDCxOsN3LSN4DvY4RJqXg70WM2N4KYFktwd3se8 55FNs4DZVVgEfqNha4GhOWYfxmcylRFKNKK0Z+hGCsrvuyWogrsXv9mS9qPoSiKS59xo hcmA== X-Gm-Message-State: AOAM531pMBFFGkuBkleoqFrfl5YgAVk/etQfotVsP4jDqVS0C+YyTSSx O4ekQK+u9OaOEZqQV1FoerjeHAkBqUppCw== X-Received: by 2002:a17:90a:7487:: with SMTP id p7mr178809pjk.233.1595507728801; Thu, 23 Jul 2020 05:35:28 -0700 (PDT) Received: from nsathish-Latitude-7480.iind.intel.com ([192.55.54.42]) by smtp.gmail.com with ESMTPSA id z11sm2849823pfr.71.2020.07.23.05.35.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jul 2020 05:35:28 -0700 (PDT) From: Sathish Narasimman X-Google-Original-From: Sathish Narasimman To: linux-bluetooth@vger.kernel.org Cc: Sathish Narasimman Subject: [PATCH v5 5/8] Bluetooth: Let controller creates RPA during le create conn Date: Thu, 23 Jul 2020 18:09:00 +0530 Message-Id: <20200723123903.29337-5-sathish.narasimman@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200723123903.29337-1-sathish.narasimman@intel.com> References: <20200723123903.29337-1-sathish.narasimman@intel.com> 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 85de1f356610..e48f0945a417 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -2242,7 +2242,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