Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1786494ybk; Thu, 21 May 2020 15:29:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyB8bO/e/xrwXlSPkdh/dPOtS7KqamYd3eqpQRQImrCdbBro4xK9SPaH6BLwYqArIk4o09 X-Received: by 2002:a17:906:c785:: with SMTP id cw5mr5429944ejb.543.1590100145740; Thu, 21 May 2020 15:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590100145; cv=none; d=google.com; s=arc-20160816; b=bTTyB0/zejy9JX0Ihqsh9hYQF9ratJGgVL/U/1UTEXll40FpltbIYvX+ODg4nTTUGf XAGuhVf6156eAVZ+mxeZ505nTs7k7gym9D62xi2r33euyt/+6fXF2fndEdH12hfSAuPx 5AzxIM2UL7nS6UkaKrA+rVVEBYuee/Ry0/ggcqxh9qolUw9sl6R3RvAJKohyd5mkH9vc 88YAal3UHvyZW3WdWknTUb9Gg0rCemAj3JljObat9IWC+95WAiVCZnf+TNg2oGF7l+wb fLCZF4e9rjNVx6yXSxty1njLnX9uIgVSRtf0+qoxX9SakCPFOZDO+BM0gwq6jqohg+Rr FN0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=LDNwwJfMQGB0wsOXTTth11eq+wMXqRggTWRZValFAVo=; b=XWOI1Tj9oUyZLK8zc1m8tEpx4Y9N7FigbGQwKgM+c6CFr5UhwWskAkd1PFzrQd+uhk 8djyXMtYLq1v0NIED3V2BQQrHuY3aUsAEtiZw1C6Awq7I2QOD7D1/+vIqBj2sHgaHfpu JKhxnvS22MkwE+128dOqF7PDYRerygkykHwwRM+B+KVoSDFt3Xw+6ddnEMVDvbvNZ2RF cN2QkNbgUbPxG34L2pn95BHJbxxJWv4BS5NJSnE6aZ05D8XGCRvX/hgUGEvgNqyAwS7/ sHaWjDVV2PfCqs04wJlXW4hjF3LsKXmvzR7KcTLbwZsLBsiF7T49w5KygHwSJUMiBt1B jldA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Zty6a1LN; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t12si3681589edc.551.2020.05.21.15.28.28; Thu, 21 May 2020 15:29:05 -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=@google.com header.s=20161025 header.b=Zty6a1LN; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730621AbgEUW2G (ORCPT + 99 others); Thu, 21 May 2020 18:28:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730465AbgEUW2F (ORCPT ); Thu, 21 May 2020 18:28:05 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BFE6C061A0E for ; Thu, 21 May 2020 15:28:04 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id m12so7882066ljc.6 for ; Thu, 21 May 2020 15:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=LDNwwJfMQGB0wsOXTTth11eq+wMXqRggTWRZValFAVo=; b=Zty6a1LNsQgI+6x4KcDTyUCC6wadJjBbCfnHeQER6ym0fvhSD4iJpjtLeeASxXdkJs XM9e9ABfPe6NU3DJjaFt6aTYxcmLbeBUbC30eay9J8pfrRYtP2EG31lDfUhsLIt3uNw6 JSdAsYkxfFHEpIdYsb7zVWoJtmH8SDldE1rStnxQNYcvPlgBGu8lYx3Dzrov02vu8ic4 TElGmH5rYFEXntfhNT1Blgfl8FKRZRhFGK+gSvRQ9CuqjZsdqSfg2qzX5VwUqYIj7oOd IyZ55bDpL0F6nSOxY8dAJlSSlDLTNa4Fn0bCQhtUVfo3Kb+JwuBXNGA5cR48S1QA3gy+ 3S6A== 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:content-transfer-encoding; bh=LDNwwJfMQGB0wsOXTTth11eq+wMXqRggTWRZValFAVo=; b=Cl/eahV14dhKc84IR+KJ4eo5fgr/v/5jl08w8dew9fk++0keAlx31dfj1Qn6e/6Nnj i/rlJLJoYuhBo5h9rgxl5cJ14gB1hhh03tRmsoJPbdQH6JZ64LBRghaiV5DT4/YjRH8V 5izcAWzFCi8vz7wXwoLoo3tdc4czMHMlGEagaXuNNqY295EjwHT0uSmw/RG7R2qwBeeo 0QLvI8mlk7I8d68Ot9RFvep6mVtSph7ZKfIfSdOAH0YCJknhpiBC7DAkJUrb+gt/9rZP QxlSTKwzJAl+e9i6+Uhv423SH3QDuHLF1VkcWBLTy5M3WxEJt3nGM5ZTKDk2spoCyiMI 5BXQ== X-Gm-Message-State: AOAM531NZX6ddgWdNcY5MYdFju2iq1+vIH5br4R3EhlQXtPzU7VIKnGQ PXLlZzoVqr1jyn+ZS2IepqRfqs/ziX4efVnUUMXT8A== X-Received: by 2002:a2e:3a13:: with SMTP id h19mr6076536lja.75.1590100082193; Thu, 21 May 2020 15:28:02 -0700 (PDT) MIME-Version: 1.0 References: <20200521145757.245774-1-alainm@chromium.org> In-Reply-To: From: Alain Michaud Date: Thu, 21 May 2020 18:27:49 -0400 Message-ID: Subject: Re: [BlueZ PATCH v3] doc:adding definitions for load default params mgmt op To: Luiz Augusto von Dentz Cc: Alain Michaud , "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Luiz On Thu, May 21, 2020 at 6:05 PM Luiz Augusto von Dentz wrote: > > Hi Alain, > > On Thu, May 21, 2020 at 1:12 PM Alain Michaud w= rote: > > > > Hi Luiz, > > > > > > On Thu, May 21, 2020 at 12:26 PM Luiz Augusto von Dentz wrote: > >> > >> Hi Alain, > >> > >> On Thu, May 21, 2020 at 8:05 AM Alain Michaud wr= ote: > >> > > >> > This change adds the definition for the load default parameter comma= nd. > >> > In particular, this command is used to load default parameters for > >> > various operations in the kernel. This mechanism is also expandable = to > >> > future values that may be necessary. > >> > > >> > This will allow bluetoothd to load parameters from a conf file that = may > >> > be customized for the specific requirements of each platforms. > >> > > >> > --- > >> > rebase against current master > >> > > >> > doc/mgmt-api.txt | 62 +++++++++++++++++++++++++++++++++++++++++++++= +++ > >> > 1 file changed, 62 insertions(+) > >> > > >> > diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt > >> > index 6ee01fed8..c6575e654 100644 > >> > --- a/doc/mgmt-api.txt > >> > +++ b/doc/mgmt-api.txt > >> > @@ -3223,6 +3223,68 @@ Set Experimental Feature Command > >> > Invalid Index > >> > > >> > > >> > +Load Default Controller Parameter Command > >> > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > >> > + > >> > + Command Code: 0x004b > >> > + Controller Index: > >> > + Command Parameters: Parameter_Count (2 Octets) > >> > + Parameter1 { > >> > + Parameter_Type (2 Octet) > >> > + Value_Length (1 Octet) > >> > + Value (0-255 Octets) > >> > + } > >> > + Parameter2 { } > >> > + ... > >> > + Return Parameters: > >> > + > >> > + This command is used to feed the kernel a list of default co= ntroller > >> > + parameters. > >> > + > >> > + Currently defined Parameter_Type values are: > >> > + > >> > + 0x0000 BR/EDR Page Scan Type > >> > + 0x0001 BR/EDR Page Scan Interval > >> > + 0x0002 BR/EDR Page Scan Window > >> > + 0x0003 BR/EDR Inquiry Scan Type > >> > + 0x0004 BR/EDR Inquiry Scan Interval > >> > + 0x0005 BR/EDR Inquiry Scan Window > >> > + 0x0006 BR/EDR Link Supervision Timeout > >> > + 0x0007 BR/EDR Page Timeout > >> > + 0x0008 BR/EDR Min Sniff Interval > >> > + 0x0009 BR/EDR Max Sniff Interval > >> > + 0x000a LE Advertisement Min Interval > >> > + 0x000b LE Advertisement Max Interval > >> > + 0x000c LE Multi Advertisement Rotation Interval > >> > + 0x000d LE Scanning Interval for auto connect > >> > + 0x000e LE Scanning Window for auto connect > >> > + 0x000f LE Scanning Interval for HID only > >> > + 0x0010 LE Scanning Window for HID only > >> > >> I remember commenting that we don't have profile information on the > >> kernel so Im not sure how you are planning to detect the when the > >> device is HID or not? > > > > I expect we'll need to add an Add Device flag to carry that information= down into the kernel. The hid profile already sends an op, so it's relati= vely trivial to carry that information in so we can apply specific scanning= requirements for that case (which are less aggressive and therefore have l= ess of an impact to Wifi and BT performance). > > Well if we will need to feed that information of the profile type we > might as well just feed the intervals directly, that way any profile > that needs some different parameters than the default can all use the > same command and we don't have to grow this list when a new profile > want to use different parameters. > That might be another option indeed. I wonder how far you'd want to take this to have the profile provide all the values. At some point, you'd need some logic that would pick the value that meets all the profile requirements so if one wants w:100, i:200 and another wants w:200: i400, you may need to scan at 100% to meet the requirements of all profiles... I think that with the current proposal, while less flexible, may avoid this complexity/condition.. > >> > >> > >> > + 0x0012 LE Scanning Interval for wake scenarios > >> > + 0x0013 LE Scanning Window for wake scenarios > >> > + 0x0014 LE Scanning Interval for discovery > >> > + 0x0015 LE Scanning Window for discovery > >> > + 0x0016 LE Scanning Interval for adv monitoring > >> > + 0x0017 LE Scanning Window for adv monitoring > >> > + 0x0018 LE Scanning Interval for connect > >> > + 0x0019 LE Scanning Window for connect > >> > + 0x001a LE Min Connection Interval > >> > + 0x001b LE Max Connection Interval > >> > + 0x001c LE Connection Connection Latency > >> > + 0x001d LE Connection Supervision Timeout > >> > + > >> > + This command can be used when the controller is not powered = and > >> > + all settings will be programmed once powered. Note that the= se only > >> > + control the default parameters. Higher level Apis may influ= ence the > >> > + effective value used. > >> > + > >> > + This command generates a Command Complete event on success o= r > >> > + a Command Status event on failure. > >> > + > >> > + Possible errors: Invalid Parameters > >> > + Invalid Index > >> > + > >> > + > >> > Command Complete Event > >> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >> > > >> > -- > >> > 2.26.2.761.g0e0b3e54be-goog > >> > > >> > >> > >> -- > >> Luiz Augusto von Dentz > > > > -- > Luiz Augusto von Dentz