Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp749706ybh; Sun, 12 Jul 2020 23:21:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2kQB2BTeo8r6OR8ecygvjG/DCBvOV9XLDKrXnnRswYPZIPAPnz7/jKEopRNgp6RhmonNV X-Received: by 2002:a05:6402:1c86:: with SMTP id cy6mr74972520edb.30.1594621286675; Sun, 12 Jul 2020 23:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594621286; cv=none; d=google.com; s=arc-20160816; b=Q1trNmJuesUAtKWFkGWI7K/X0n5jdOKTK2layTSiOH/0dB4pct2KiObWHydrFH6SG2 r3bu3/A64HDeLmFqm65UcI45kdkhwMdvVQSSLKoYwHkH3243kI5UwX7SInpgYySPOxtH dnFa7Oy+0mstIqcsysT5a1ljkYi6Eo/cTG3Hcm94wMDiMUb6UnzfEKUM/Op/T0DAdP/z Xeii38yRRXmYKyccjZ9HkbJX2lCS+RkyVUXsVvKX26zodcGhjKHaABqDS2NbIEMOGiRf Hwqfiq6TCg1lTxRP2UHtLlwvfwtUPnQU5hm0+JQ1HI96HdskEQ9NP7Ba2rPSEc4x5OcG cMMA== 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=swxFTi/qS/rOGX91yN1k+q/WlVrvh08LN2hgZKj0jP7jTdcf+4r/mGnG56QDSblSYT HMKQEnsnSaDDxEGsxltwXi/5FaDlyFalmCO+8H3qjR9qThxrlyLULi3EfvZ52DfZhqIo xisTnZEOgvI5pz4qjfUc/pl/3KHgo+1bLQoPY/Q3Zul8xZmZk+Pz6jpvgY6DkJDrLeUf UYc1ZsiQR2EW8b4WGPDdQiQvAQB5uZhMbZuvcSztCMAQazbgF2N6UPVY17dGyuyDaX9V Y8vAFnEcy7VRycShxy7ogiMkDliX2mgBaYNghnSge8xdvywhZRqATpvxPG9ZuFWC5tDC tk7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JgQsTLPh; 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 h20si8813550ejk.652.2020.07.12.23.21.03; Sun, 12 Jul 2020 23:21: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=JgQsTLPh; 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 S1729166AbgGMGSs (ORCPT + 99 others); Mon, 13 Jul 2020 02:18:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725804AbgGMGSs (ORCPT ); Mon, 13 Jul 2020 02:18:48 -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 EC915C061794 for ; Sun, 12 Jul 2020 23:18:47 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id f2so5062069plr.8 for ; Sun, 12 Jul 2020 23:18:47 -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=JgQsTLPhaOkj5WpKoQTBdC0hd15AEi3eR+BAxFwUa4FmUr1K13f7vAo8cR24V3CVxj UDjufzkeTE4vvM3swvHZvaTQsl+RL6xv0wfxkEX7+SNWlwqVBImvISzRrJ1Gscr92Rl+ VF40S6A8c054Ys2CTDO92263itje5gqOq4gq+RLiM8RtWbkenJuk5Of27Q2jsDxblaE7 McxjtkYnb7AO+rFmlxaPAkzed2Drba4KdGI0FBOFMaLTWpxZbRjXN0NCou3BXMI+60uR PKo7CdzwnMTo1WXwtM82ak+pMzYTTnL5chGciLPTbzGtxL8AaLaabMa1AU4BS/Fq4jYe SA4w== 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=WN4a+rIoRzs8GLtbsvxn9oJXGDnkXpb2WH8iC4iVmshctDegG/7p8wRsYd1unyjAYl rDjVbJD/zdihy31ZcAsiuZ6Ir6yF1OKWufDpDgmsXohB2LaMxxwzvhoXo7XxEfML2/Ux OzelOW/sNpPCpPrSMPtpOaDdMlPvR77lbDmzqfFt+piMkdTE5lOdRYu5T5QBC8akjP09 5sRPujto/tGsR2cfgR3XGvnIhqcwE8PWANPLmTFDpaNaK/vfBEBfDsJEXg0eVrZSF0OL KCIKEOM0Yt5KdgMWIvS5EILeU9Nc0AJND/PCnZTVOHUi5fmdOFGkT8R64BaOt2th8w4X 6PjA== X-Gm-Message-State: AOAM532DYR6jLJXhPn/2pjs+gmXi1/d0NisPWuQD7eikomfk01+h/Vu3 Yeq5HPyByHonrZODGZ1+2dfayhJOre29AA== X-Received: by 2002:a17:90a:1d06:: with SMTP id c6mr19291143pjd.194.1594621127375; Sun, 12 Jul 2020 23:18:47 -0700 (PDT) Received: from nsathish-Latitude-7480.iind.intel.com (jfdmzpr04-ext.jf.intel.com. [134.134.137.73]) by smtp.gmail.com with ESMTPSA id 204sm13096371pfx.3.2020.07.12.23.18.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2020 23:18:46 -0700 (PDT) From: Sathish Narasimman X-Google-Original-From: Sathish Narasimman To: linux-bluetooth@vger.kernel.org Cc: Sathish Narasimman Subject: [PATCH v4 5/8] Bluetooth: Let controller creates RPA during le create conn Date: Mon, 13 Jul 2020 11:52:10 +0530 Message-Id: <20200713062213.3692-6-sathish.narasimman@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200713062213.3692-1-sathish.narasimman@intel.com> References: <20200713062213.3692-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