Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp472797ybt; Wed, 1 Jul 2020 03:01:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8UaeGiV8O2iAMvpzhlaoIgbQoBwBjwxRoTUD/21a6HzljEtXVJbG7OSLeIUHK+saq8chb X-Received: by 2002:a17:906:3282:: with SMTP id 2mr21350703ejw.93.1593597708336; Wed, 01 Jul 2020 03:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593597708; cv=none; d=google.com; s=arc-20160816; b=ZlsKLaFet4HchCHHfpS9qUhJRHIteVQsK7ojiBHRHGWvzAhhcO4ebd1cr9YgXMJfL+ VMlZ+tsa5k9BZWNx0sofKAG4kSd1Z0UiPQMyFvDCiGaFGgoBUo86GaflrrmhyvdzbgmH G97AOYdIGAqUWWSqWWjRNRLasQjrJ/TsR+8Q7DKKYc22amJqAxy3K8t4KHz3Xr9QO/LC 1kjxvOdpMuMa8wj5dGmgoUp46JBv+sgM0Z7RfC0G7xtx+blcWOCkoDNnnbHpI4vPPU9/ pjXacdpb7TtPxDCGmt9HBdodVgUOHtLgBdWvi5GSfC9plk1M6NEHcaK2WyXCAFPy6n7w ZBIg== 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=ZfCBwWzszt0wp19IOQjQbWYB7ZUb16MS4aRNucJyhyI=; b=EpT5JvntC1FrfBPHjEYhN8wu++oJzRQ6E0GFwHfKcQYSDWdAPBElZLgEvfflthq+bj i8ae7tn51oqplMk05yIKAmbzLHoRrd2aqIk9/a26Eg8jUyBzIUjinBSBVB+ZNUW7FUo9 K7D3g1l7yuUb5ROBK53xm5xHZLofqa/ha1zAGthKvX1p7c2krnST5t/RrDM/2UmTBtka o8grGn0IZz60q2m9no5lwNzjVL0YkZwD8YolLvl4LUus6RGBpZbe9XWQTg74uiR+MchL 6hijGdIQV9jQ+s8dk6H7tLDShguhoJqg7hNFRtKMKpkAwQ6Trm8OgGkXINxEPAfJvV/L VOIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PG4tVNAm; 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 h12si3546537ejx.234.2020.07.01.03.01.24; Wed, 01 Jul 2020 03:01:48 -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=PG4tVNAm; 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 S1729696AbgGAKBU (ORCPT + 99 others); Wed, 1 Jul 2020 06:01:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725440AbgGAKBU (ORCPT ); Wed, 1 Jul 2020 06:01:20 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D199C061755 for ; Wed, 1 Jul 2020 03:01:20 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id x11so9711636plo.7 for ; Wed, 01 Jul 2020 03:01:20 -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=ZfCBwWzszt0wp19IOQjQbWYB7ZUb16MS4aRNucJyhyI=; b=PG4tVNAmrYY6eQRIYWaffh3ohZNEpAr/1AHTsZTtAefCoamTRGLx1MM7XVIQcOBLfr vQdLmfN6Dyre2fXtb9+SuCWxUY+uDNPoZxhtdGKNVkkujDlZNSyLgsul6k6sC7nVcImV dIBtGFBw/ebHd7klghTjkGudMbAPIJilsLqnlA7UxhdMBsD4dI4cyfBDqb5H/LYpqQEW y3fCZWQZ8o67UqdKjEW3hjshjFaC4Gklxu3OnVpWC4JAQkZ0FqrRsj3o2LC/fM5F1tD8 H0IBApfv8hzPef4jUvZwnkRKwBvqUXWLS4vFaX6AaUrwa4Ap0y/ODO7neL7sRgg2hlEE oNBg== 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=ZfCBwWzszt0wp19IOQjQbWYB7ZUb16MS4aRNucJyhyI=; b=DsnjCnu7cg0a/MUTkBsmwFdM89PYRu2MEuEXhcGlN27a+hTNjcwjKUZ14puNCq6zbr ThQ9G79JxMH7yLa8MYDbmv1z0ZY1tSExwpr7eA0xc29BUY7Myj1ysHNP8i4w7Ly8vcRm /ndfXj2abgChkYfihLV6qYjbAQ5JkQ3Uh7oiyUcIn8XVsHcUpsxFpmUHbt1OjHjgSc7n k72W2L2kujbOVOtAbN19ieM2Jgc9BEyYQ16hGfG9vC86d7y1P0brUUEfTNF+2elE03JP 1shb8QqkMejWg0tYegXHoSxb1m/7G0FFsCkouDFosPBraKOwNFECsh8LfIijvcU+dG2T yUBQ== X-Gm-Message-State: AOAM532FJTfwV8m+uBmM1Q2fTxNRbqu+wF27k39UIlpIrlq6FDecPiNP gXfTMNuwBp40LPzIAHGoyjThJZFyoI5CSg== X-Received: by 2002:a17:90a:ce96:: with SMTP id g22mr6851044pju.9.1593597679527; Wed, 01 Jul 2020 03:01:19 -0700 (PDT) Received: from nsathish-Latitude-7480.iind.intel.com ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id d37sm5381961pgd.18.2020.07.01.03.01.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 03:01:19 -0700 (PDT) From: Sathish Narasimman X-Google-Original-From: Sathish Narasimman To: linux-bluetooth@vger.kernel.org Cc: Sathish Narasimman Subject: [PATCH v3 5/8] Bluetooth: Let controller creates RPA during le create conn Date: Wed, 1 Jul 2020 15:34:29 +0530 Message-Id: <20200701100432.28038-6-sathish.narasimman@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200701100432.28038-1-sathish.narasimman@intel.com> References: <20200701100432.28038-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 622016287628..906721759c2f 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -2200,7 +2200,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