Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2462705ybg; Thu, 30 Jul 2020 23:30:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze+rDP/u+uWnuwyVmcvdmSBd/tNFdt336LQ5kHCmRhbmRs1eBOW8+8zWGNjtQKQ0G9aKAV X-Received: by 2002:a17:906:1c84:: with SMTP id g4mr2731308ejh.50.1596177050362; Thu, 30 Jul 2020 23:30:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596177050; cv=none; d=google.com; s=arc-20160816; b=vgHFgqIwlYNUwov/NrctFJM3EJZU6QgGgbncoXN3lpJnNIhFlukUuqsA7LtamQ/El9 eGzwrB3GE1wz8yaurSUMjv0N0n8abyYXOYyaOwPhGCvmw3CCzuMSWdVlYHpcGaszHwkd QQJ6hCV1p7Flj84lPeU3armHjI6nNDOEi3kajtCdzQ5/OoyRCIXmvjTdoCQelQ8+VvwM 1AzvLV39Y/DVyPWUnEX0ndKVP2NJ9jumwlmLHKgnwCvmK56nN4j59tspk89BbBgnV3ln 6A1KRM48q6FdW+cDfbb3e1WVEM6NJK7D5vPKSpquesqTsNLgS/kIylXMD11+z1YT4fPI s5GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=9kuN9S039wOVX3znv3qG7ayOx7Qx4dUD3ix5u1QJozQ=; b=F68eeB9E86CtQX0eOrXW/2K4T52KVydK7yhZen05BkaSdC1ncb+WJ0wzb1pX1x+6Vx 9Gx88H0XcUN2Y1e0l+pfWy/6uZmqzoUIqP4xr8yapKhR1iF0KOvyd6KFqdNxEEFmPr6z Qs76RX0r+ntvUS+0Hfl4P9jIVa1ETsx+YUeKQR2b20LB/gBzg91LEsM9+Z5pCTvqKY7W e4Z0QRrMw0k0nJPUQYGofciEvFq28UdRzR4IJg3oPJ1VSjVKb3Mve839gXq1wa37lDoY vjegZ7HBfeTSCm3hu+2Y6qn/cieVH7s0sMzHoq2t5HjurMgipfPEQ66XZT41STpPXDya viZQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r20si4634010ejz.158.2020.07.30.23.30.22; Thu, 30 Jul 2020 23:30:50 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731395AbgGaG3n convert rfc822-to-8bit (ORCPT + 99 others); Fri, 31 Jul 2020 02:29:43 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:51784 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731351AbgGaG3n (ORCPT ); Fri, 31 Jul 2020 02:29:43 -0400 Received: from marcel-macpro.fritz.box (p4ff9f430.dip0.t-ipconnect.de [79.249.244.48]) by mail.holtmann.org (Postfix) with ESMTPSA id 33F24CED04; Fri, 31 Jul 2020 08:39:44 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH v2] Bluetooth: use the proper scan params when conn is pending From: Marcel Holtmann In-Reply-To: <20200731010535.1422455-1-alainm@chromium.org> Date: Fri, 31 Jul 2020 08:29:41 +0200 Cc: Bluetooth Kernel Mailing List , Abhishek Pandit-Subedi , Yu Liu Content-Transfer-Encoding: 8BIT Message-Id: References: <20200731010535.1422455-1-alainm@chromium.org> To: Alain Michaud X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Alain, > When an LE connection is requested and an RPA update is needed via > hci_connect_le_scan, the default scanning parameters are used rather > than the connect parameters. This leads to significant delays in the > connection establishment process when using lower duty cycle scanning > parameters. > > The patch simply looks at the pended connection list when trying to > determine which scanning parameters should be used. > > Before: > < HCI Command: LE Set Extended Scan Parameters (0x08|0x0041) plen 8 > #378 [hci0] 1659.247156 > Own address type: Public (0x00) > Filter policy: Ignore not in white list (0x01) > PHYs: 0x01 > Entry 0: LE 1M > Type: Passive (0x00) > Interval: 367.500 msec (0x024c) > Window: 37.500 msec (0x003c) > > After: > < HCI Command: LE Set Extended Scan Parameters (0x08|0x0041) plen 8 > #39 [hci0] 7.422109 > Own address type: Public (0x00) > Filter policy: Ignore not in white list (0x01) > PHYs: 0x01 > Entry 0: LE 1M > Type: Passive (0x00) > Interval: 60.000 msec (0x0060) > Window: 60.000 msec (0x0060) > > Reviewed-by: Abhishek Pandit-Subedi > Reviewed-by: Yu Liu > Signed-off-by: Alain Michaud please swap these around, the signed-off-by from the author should come first. > > --- > > Changes in v2: > - Fixing Yu's email tag > > net/bluetooth/hci_request.c | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) Patch has been applied to bluetooth-next tree. Regards Marcel