Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp717421ybj; Tue, 5 May 2020 06:45:17 -0700 (PDT) X-Google-Smtp-Source: APiQypKCm4dIDIkgwQSjIZJk3Y8w4YrQTa3ZDG/aq7H+4rT0z+Ybr0q57YrKW5ZvfyD33v654Xbe X-Received: by 2002:aa7:ce05:: with SMTP id d5mr2725274edv.120.1588686317672; Tue, 05 May 2020 06:45:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588686317; cv=none; d=google.com; s=arc-20160816; b=EsWFIkP1i/t14PqJmaUsvVn2+Dnuwl/GrriPkrFT1RCatnJAK4d0W7WhI0SERRPJno VYjnwjG+zSDI3PU9Fg7+WyyAD80H5+Os6cHcUTo8+w8Ds+Xv/+hH3HJufg04tUUCkiE4 sbHs6RQcBjbWjqDyhpydLOH+JabM9MQR733aG9Y272yDJZxpvOls7QnaK8dNVD8STKiQ 38DZaYKZmk+/jwwatTvaWJ59FjnoeVS9ZPsOl09opmQ2takYBc5uMXDENgRYj8Z4AI+D Rgpg/JkTJkJJOBCLf64FRVYZyvc8IG2+8l2qRmAfnGclerauQ9YoVcJ5mEM4AHA9kHRl yrCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=nx5Dsj+fjg1uB6ZpgPoWcwXG6hef6r/91ODJ1zBIyPg=; b=cGi2l3b4uNumpl+SFm33AW6SnQQsuS/snwdECSaTLofQOyVKTW68rEP0h63JeiKnGU +BGYkHwxNzm6O/0i61U4tzQvoUY0h9Hrx0Y9khJewvy2XuSHWBIPe9+01N+FiAmIjCbW cDF/bofgnT/ZXNABVZzoDphy65MxW8fr+wxPUVVgS/+uMY9a0N8GtJskRTFM7oPMQhiy yU2xFdY42Tp3B36xar+mGpqo5ZegMNpbjs2WrkKeRvXnLD7dyjxqqlAwRcx4l187XQp3 o3MCvCuGw8Dk3TwksAaYz9FWUIm6T4u2redOeFEgmtgUiJ1BJxUCrDE19kfENtxdiP/v arxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Gimnspfs; 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 r24si1330127edm.269.2020.05.05.06.44.39; Tue, 05 May 2020 06:45:17 -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=Gimnspfs; 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 S1728954AbgEENoe (ORCPT + 99 others); Tue, 5 May 2020 09:44:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728912AbgEENoe (ORCPT ); Tue, 5 May 2020 09:44:34 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA212C061A0F for ; Tue, 5 May 2020 06:44:33 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id w11so1399433iov.8 for ; Tue, 05 May 2020 06:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nx5Dsj+fjg1uB6ZpgPoWcwXG6hef6r/91ODJ1zBIyPg=; b=Gimnspfs1oOoIfFZPpYpWBGbIjWcVzgB44dLn9FalAqUE77GqJEpxZUx4DtAgi/5wj Pug9GJnI/WTRtHa9q8FYhxl+pFt47botasjQ6isUEylqK9sl2++rmrK74kpSs9GZ2fso SV43UEba8s+UqzCcYRepi+M5KlWZ67Q7/xTS6H8mlsamB9IDIsPt8duCNtbp6X9f/qVL UJEZl5O7eHNGUXnnIC5vFCygQwVtm8PwZdWwskBvTgfwDpKIFtt12wg7izoEAv1QNbMm 1VR/3IAtYCcbzLhwOhUW4bDL/cp0r2yR9NPf2nZpfZqCLDewSg43ghaaOt+SJkZfCTew H5ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nx5Dsj+fjg1uB6ZpgPoWcwXG6hef6r/91ODJ1zBIyPg=; b=NnmGbykg7f/EvuIRPeWnP9MULwiRkANbl7v6Kp4fhxG+T0M2YbuPdA+FaKWchXR1jo /rdakwuNsWtIYEl2bdrhEYDDOvJ/lExMm9IxjyC7FHCvwofW92s3KX9fCrRMUAklj3ti ldiXdx1IzqsuJ2mws8lhwCy2Qc/D4UZoo9mIX3/P7VHPO/+FAcrU7kZpsz4Wm9IlBkH9 nL7W2cZS+EAuoY5SI+WD/iYN1Q1i9sShhfJS/qjCaQvpdEf2pZMECKBqK1V2nbp8VYzR wkoMfGx6Ks+RA+2NuW2cTKBBMiWq6L/rmX2KQq+uump1NLoG2ZpssBbFVErgVm8mDcgq i78g== X-Gm-Message-State: AGi0PuZoMWPiXIon/v9nqr0q12wQX0nzq7gBEsdgfkdfqGcZ7ey051IB EAT1I/VRVVGnmOuMXUmQ/+Z4wFkrGh/pat7q4gw= X-Received: by 2002:a5d:8c89:: with SMTP id g9mr3389325ion.1.1588686273227; Tue, 05 May 2020 06:44:33 -0700 (PDT) MIME-Version: 1.0 References: <20200407205217.1002534-1-marcel@holtmann.org> <1FE78D4A-E6EC-440C-B76E-82F75D615D92@holtmann.org> In-Reply-To: <1FE78D4A-E6EC-440C-B76E-82F75D615D92@holtmann.org> From: Sathish Narasimman Date: Tue, 5 May 2020 19:14:21 +0530 Message-ID: Subject: Re: [PATCH v3] Bluetooth: Configure controller address resolution if available To: Marcel Holtmann Cc: Abhishek Pandit-Subedi , Bluez mailing list Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Marcel On Wed, Apr 8, 2020 at 11:46 AM Marcel Holtmann wrote: > > Hi Abhishek, > > > This looks good to me. > > > > Reviewed-by: Abhishek Pandit-Subedi > > however it is not enough, we also have to enable address resolution before calling LE Create Connection. It is actually a bit tricky to enable / disable address resolution correctly. When we receive directed_adv we disable the scan. which disables address_resolution. immediately I was trying to enable address resolution inside hci_req_add_le_create_conn @@ -813,6 +813,12 @@ static void hci_req_add_le_create_conn(struct hci_request *req, return; } + if (use_ll_privacy(hdev) && + !hci_dev_test_flag(hdev, HCI_LL_RPA_RESOLUTION)) { + __u8 enable = 0x01; + hci_req_add(req, HCI_OP_LE_SET_ADDR_RESOLV_ENABLE, 1, &enable); + } + if (use_ext_conn(hdev)) { struct hci_cp_le_ext_create_conn *cp; struct hci_cp_le_ext_conn_param *p; where this fails as the flag is not cleared yet. where the idea is to bool addr_resolv as below ->hci_req_add_le_scan_disable(req, addr_resolv) In which we can stop disabling addr_resolution and continue le_create_conn during hci_connect_le > > Regards > > Marcel > Regards Sathish N