Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1482048pxx; Fri, 30 Oct 2020 10:59:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYdHpdTaOWv43sEeEfhOyODhR/HTmj99XYYX4x4LnhtwgeXvU6k+3xZxPz85+2e4AnVeQv X-Received: by 2002:a17:906:3582:: with SMTP id o2mr3616720ejb.518.1604080757058; Fri, 30 Oct 2020 10:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604080757; cv=none; d=google.com; s=arc-20160816; b=ytU3jk7MA8Dd4vqj8gp9GRX0bYo9/WSM/gK5BFgGRUAUUewZJliOfsTaGM+4L+wEis alWm6a9hxdxs8nJJSLHiTOUNeBSiUWpYYPNlWkFD1R3eFEfJDHy9Lp2X3EtY7SMfG38F SGHkSjsbt/BxGj9h6VCzlFY7k6ZM+nGZisQYPnKOQ22taLh8IRNi49WagLG0SiUkIuHv PQkfdgy/J+YtP5/7heKX7ly0uwWLSofVT6BqVZCplSrZQQ/AW0kSUM6rd46c45iYhxz7 9PUnag2TDdP2xZmdj4WeyQO74Klol3hirTNgowMf4okOL1BeaeLIXih9vXANWc9jXROo 28Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=NAcW8A4EiFC40/QVLzCiB+RO0JWsuCng4T77lJWLbZA=; b=nzp2eQPt6YqkeCD3oJdbBtLPPPAxDLzQ/AvanSXNJDwbjWTvGE0/GxIA0MijhB9fl5 x+JtUf9/JpL4EgKGGUYBzg0y8UOSlJU7ZyAOn/rmab3jTScO9drWTLMqPRfAgBT7TuUi jpksVh1N+5lSxsOz5KCMGP7umoqVZH8qPjjPWASSpiyD3VrYJOSBhp+ZTHIsQLblbf5T Erve6e9b86Jp03qdMkOUg5bb9Wx/sa5PYKTAf/+fRnLT8mT0Vwmyu4rZaxTKPPZGi1I/ rBHlEt5feHD8spJ1yiqG3kJ9JB3HaH2I730lndE5sz4JYI9YujKkXCsdkaDI4VmWguEY wa0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Fpxto9EL; 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 g4si4716097ejw.351.2020.10.30.10.58.34; Fri, 30 Oct 2020 10:59: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=Fpxto9EL; 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 S1725922AbgJ3R63 (ORCPT + 99 others); Fri, 30 Oct 2020 13:58:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725808AbgJ3R63 (ORCPT ); Fri, 30 Oct 2020 13:58:29 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A5D6C0613CF for ; Fri, 30 Oct 2020 10:58:29 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id w145so1840423oie.9 for ; Fri, 30 Oct 2020 10:58:29 -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=NAcW8A4EiFC40/QVLzCiB+RO0JWsuCng4T77lJWLbZA=; b=Fpxto9ELuIucF+i06i/85HT5OT5ziCwzDAyjYiDVrqLeZ4heOp3RDHv18k4UQtJjxu hiLg/Jdm+KaNM6k8xiMRUTzPpr0y1Tx3wxZP2Nkygx3CRCKwTT1K063rJEU4QjB1HqAp Qr7QNU5qlSWm0Gs8fSgwAc/+yCfIohACL9lB8ajyK7KLX52k623Zk1BWZL00rpUs6qyS aUgD8pO+1pA4nEZpN9YaWX92mHPeu/jXlK9khKSqw/Iq9fslB+82AzukbE3f+X6tTBEg hQyxIDH+b8XHdPODaqiy5vInOaH8UOAcProwlw56Xn9+Y7qlRO+k5Zn1idUTjCQcqdw2 H8KA== 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=NAcW8A4EiFC40/QVLzCiB+RO0JWsuCng4T77lJWLbZA=; b=OUesfP7x2n4pWlTnREUsQ6i7hTyVBZVZsnIPBC9PdM7LFgxtKNhS/fRtK6j7qCX8B6 WYIeBGT46aYoDpL3Q43TA3Ec90CeiS+6XNjVgpDzgsraW9pmapVBmB9BAPYA7eKVtIJz WD1kXQDP6fGX8BQQm9RtszgkCS+Z3VE+dnd9Efh01CFXTDFmmfEFJNx7xH32cosVgc0J Jt7iVZaQAM/7NTdteEfH066dthOJbm+2tdOqOTaq3ZZp9ARjf67cYtQd+RVGbCl/7F6T HdGpUVGhnmw9spFzgLevGyYn309sPRapV+WquVzUKIevX74skI1h22pFQ8P86h6pDLfp k14g== X-Gm-Message-State: AOAM5303qz0DXr9NqNpKV9wdWBZ1gA2CWbQQ27iUb08h03vxPlkikp84 uGfzXRiQnsNpp7d7z9sI7C9lqUE0XdPQB/k1nJE= X-Received: by 2002:aca:c70b:: with SMTP id x11mr1918760oif.58.1604080709013; Fri, 30 Oct 2020 10:58:29 -0700 (PDT) MIME-Version: 1.0 References: <20201030170932.BlueZ.v2.1.I1f083629d41c747a33a3937fbc199ea37dccde12@changeid> In-Reply-To: <20201030170932.BlueZ.v2.1.I1f083629d41c747a33a3937fbc199ea37dccde12@changeid> From: Luiz Augusto von Dentz Date: Fri, 30 Oct 2020 10:58:18 -0700 Message-ID: Subject: Re: [BlueZ PATCH v2 1/3] core: Add parmas to set interleaving durations To: Howard Chung Cc: "linux-bluetooth@vger.kernel.org" , Manish Mandlik , Miao-chen Chou , Alain Michaud Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Howard, On Fri, Oct 30, 2020 at 2:11 AM Howard Chung wrote: > > This patch adds parameters to control the durations of allowlist scan > and no-filter scan when the kernel is doing interleaving scan. > --- > > Changes in v2: > - re-implement on new mgmt_tlv API > > src/adapter.c | 12 ++++++++++++ > src/btd.h | 3 +++ > src/main.c | 12 ++++++++++++ > src/main.conf | 7 +++++++ > 4 files changed, 34 insertions(+) > > diff --git a/src/adapter.c b/src/adapter.c > index cac90b01bdc0..bdfe41d7e88c 100644 > --- a/src/adapter.c > +++ b/src/adapter.c > @@ -4342,6 +4342,18 @@ static void load_default_system_params(struct btd_adapter *adapter) > goto done; > } > > + if (btd_opts.defaults.le.advmon_allowlist_scan_duration) { > + if (!mgmt_tlv_add_fixed(tlv_list, 0x001d, > + &btd_opts.defaults.le.advmon_allowlist_scan_duration)) > + goto done; > + } > + > + if (btd_opts.defaults.le.advmon_no_filter_scan_duration) { > + if (!mgmt_tlv_add_fixed(tlv_list, 0x001e, > + &btd_opts.defaults.le.advmon_no_filter_scan_duration)) > + goto done; > + } > + > err = mgmt_send_tlv(adapter->mgmt, MGMT_OP_SET_DEF_SYSTEM_CONFIG, > adapter->dev_id, tlv_list, NULL, NULL, NULL); > > diff --git a/src/btd.h b/src/btd.h > index 4cd117538fda..b0df77fe3ab3 100644 > --- a/src/btd.h > +++ b/src/btd.h > @@ -71,6 +71,9 @@ struct btd_le_defaults { > uint16_t conn_latency; > uint16_t conn_lsto; > uint16_t autoconnect_timeout; > + > + uint16_t advmon_allowlist_scan_duration; > + uint16_t advmon_no_filter_scan_duration; > }; > > struct btd_defaults { > diff --git a/src/main.c b/src/main.c > index 0ae45015fbe8..47887a4059a1 100644 > --- a/src/main.c > +++ b/src/main.c > @@ -114,6 +114,8 @@ static const char *le_options[] = { > "ConnectionLatency", > "ConnectionSupervisionTimeout", > "Autoconnecttimeout", > + "AdvMonAllowlistScanDuration", > + "AdvMonNoFilterScanDuration", > NULL > }; > > @@ -497,6 +499,16 @@ static void parse_le_config(GKeyFile *config) > sizeof(btd_opts.defaults.le.autoconnect_timeout), > 0x0001, > 0x4000}, > + { "AdvMonAllowlistScanDuration", > + &btd_opts.defaults.le.advmon_allowlist_scan_duration, > + sizeof(btd_opts.defaults.le.advmon_allowlist_scan_duration), > + 1, > + 10000}, > + { "AdvMonNoFilterScanDuration", > + &btd_opts.defaults.le.advmon_no_filter_scan_duration, > + sizeof(btd_opts.defaults.le.advmon_no_filter_scan_duration), > + 1, > + 10000}, > }; > > if (btd_opts.mode == BT_MODE_BREDR) > diff --git a/src/main.conf b/src/main.conf > index 1b349821294b..a3f2020b04dc 100644 > --- a/src/main.conf > +++ b/src/main.conf > @@ -160,6 +160,13 @@ > #ConnectionSupervisionTimeout= > #Autoconnecttimeout= > > +# Scan duration during interleaving scan. Only used when scanning for ADV > +# monitors. The units are msec. > +# Default: 300 > +#AdvMonAllowlistScanDuration= > +# Default: 500 > +#AdvMonNoFilterScanDuration= > + > [GATT] > # GATT attribute cache. > # Possible values: > -- > 2.29.1.341.ge80a0c044ae-goog Applied, thanks. -- Luiz Augusto von Dentz