Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp744473ybh; Sun, 12 Jul 2020 23:09:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8otu0ZyiHtvCqE/4FdqQovV7m+G5o96s9QtyEMfpzrX+uwAX6625QvlCYzMO8f6gqpn72 X-Received: by 2002:a05:6402:a43:: with SMTP id bt3mr77678950edb.332.1594620562560; Sun, 12 Jul 2020 23:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594620562; cv=none; d=google.com; s=arc-20160816; b=tVPImfQOox/y0uxM91+SCqPt3p3S4vp57vwgbhOpsYo1oR51+RVYR8Vj5xFEgfqIVe mRKJDIZXv7c/fv61IfQUn3cFvS6ZJmiq4V27u5xTTXrJf2gB4tJauFcc24lUVqO9nKzC JjjEE0e+idXZq2k1rGo4/ZUV0+Lspi6QeImyGcbfanNy1MTNiNKWlbH2d/Toq4U8ye+7 XeKD7vSo8Wn+PAACyC2IU2Y70SQ3tFA9Q/DGiRZo/HEAjtRol8IEnUiqDpTT8ZNqUGcp ZLwWml17/lNPVd5Qm8R9GQD/ubMIj9+Q/NzwONBuwax19hFsdpt9cMOyV1ynaEC0660Q QM2w== 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=nCVTz/TW1C8kDWW89hWnxqM0hLVoG7bmfidmPtnLD50=; b=lYvHjLGSBjQLnSCfWfG2U6vT6FI16sU7eD+JOyVmcVQLQfoBiJ90YGlOje65YVOduR r5GEJt+pUV8Wk6W9Lhj0GJS+aTCwON5gW+4BTq02txKix2R5Bsd9TpJk7u/jWgBx6v+D Phn81xPuJsLlnxKjg+26Nj4u7HYTMkv/LbjIulxotNQPeJTTUTeenFX5aWs8vru6Pjlg qrvkP4mj0aX7RFX8QktKJcw+TaG10Rtkwz5Y7oPs2zhiYUvk1T/RJmr34Y4lo2PlTCv2 KZWH13AA9tnXTin9dpzwYDANzadshVSSotipeklCGSfalcQN1bes8oI5Izo3jW4/QzGg vRIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GBQNpsxH; 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 l10si8422565ejh.673.2020.07.12.23.08.59; Sun, 12 Jul 2020 23:09:22 -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=GBQNpsxH; 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 S1729052AbgGMGIt (ORCPT + 99 others); Mon, 13 Jul 2020 02:08:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726571AbgGMGIt (ORCPT ); Mon, 13 Jul 2020 02:08:49 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72626C061794 for ; Sun, 12 Jul 2020 23:08:49 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id z3so5525690pfn.12 for ; Sun, 12 Jul 2020 23:08:49 -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=nCVTz/TW1C8kDWW89hWnxqM0hLVoG7bmfidmPtnLD50=; b=GBQNpsxHWzus4iheWeS6lUiRhY4S92H+Qhv+rsw/+d2OrsJcTor9RmgbSXLwwfaytM kaKiuadUNhQS2YFRJWV7n5pin7xM5GlNrYXNP/fTJEzKfsLt2BO86GnfoUZptuEfi1gu NE8htptB+Q6h8QjHIVq92I0PcT7WjouvoyU1wKVoh6ZUf5hJxgO2i0seP0Pckxb38rPo umckJzxaCwf/AUoHGPykj65MgYS2zKI7uYrF8eEdQYg7GFLJauT1UcQFx2/Qo+IsVeno 6R/gqG2UUFtHsVkRug9R2DpgXs/OfQaDSrrCj6ONSFj5uFdPfGYubQMODAcqZZbm9710 B5lw== 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=nCVTz/TW1C8kDWW89hWnxqM0hLVoG7bmfidmPtnLD50=; b=j6Tdy5C2uPP66ZFJnwDeWYloeYbV9bYX9nbJBR1/sP8dVSdf7neI4hwl7jYgwLwzPX BHDUsdKoNfEQlsTamjW95OgV2fS0G/r0x+4Blm6GfaFomIeJOTxXuX2imgHjhZjzCrFP PWwhzi1dlxqLtrUQAwfi2NmS9KDN8De6R61zW8F5N4t8lUMy6+mxDJgGPsfnvb4gxx4f qMDXw1Xhmzv6kRcci6KO9HgbhuTpwcG7kyL8s8X/qLMrx7CRlbv4kmpNeIaJUyCaNu3s KHR0nLkwKP5pbFkkak969g7AkEBQBl6V2tJPvXvheybP2j1CrsqAafQ6Ci+ij1D0CA7t fmtw== X-Gm-Message-State: AOAM5320YcXWnWXyPjLqkv07J+pbFtyx6/8b1dQcyHUGPaESJBYB3YAe RgkT3c4e9sDNnXCwhNiHgdmi2FXmsy3J1Q== X-Received: by 2002:a63:2241:: with SMTP id t1mr66885154pgm.440.1594620528835; Sun, 12 Jul 2020 23:08:48 -0700 (PDT) Received: from nsathish-Latitude-7480.iind.intel.com ([192.55.54.40]) by smtp.gmail.com with ESMTPSA id e5sm12787172pjy.26.2020.07.12.23.08.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2020 23:08:48 -0700 (PDT) From: Sathish Narasimman X-Google-Original-From: Sathish Narasimman To: linux-bluetooth@vger.kernel.org Cc: Sathish Narasimman Subject: [PATCH 5/8] Bluetooth: Let controller creates RPA during le create conn Date: Mon, 13 Jul 2020 11:42:17 +0530 Message-Id: <20200713061220.3252-6-sathish.narasimman@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200713061220.3252-1-sathish.narasimman@intel.com> References: <20200713061220.3252-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 2dc00604412c..e16d5154b2cf 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -2201,7 +2201,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