linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: Joseph Hwang <josephsih@chromium.org>
Cc: "linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"Marcel Holtmann" <marcel@holtmann.org>,
	"Pali Rohár" <pali@kernel.org>,
	"ChromeOS Bluetooth Upstreaming"
	<chromeos-bluetooth-upstreaming@chromium.org>,
	"Joseph Hwang" <josephsih@google.com>,
	"Miao-chen Chou" <mcchou@chromium.org>
Subject: Re: [BlueZ PATCH v5 2/3] adapter: read quality report feature
Date: Tue, 29 Jun 2021 13:27:18 -0700	[thread overview]
Message-ID: <CABBYNZJsH_2HJXOMj7gbsKDuXwMnx+WOR7i8MiL3a_NtDu5WLA@mail.gmail.com> (raw)
In-Reply-To: <20210629154652.BlueZ.v5.2.I7d16f055bc51ac86915c114c671743f49a1fc226@changeid>

Hi Joseph,

On Tue, Jun 29, 2021 at 12:47 AM Joseph Hwang <josephsih@chromium.org> wrote:
>
> This patch adds a new UUID for the quality report experimental
> feature. When reading the experimental features, it checks if
> the new feature is supported by the controller and stores the
> value in the quality_report_supported flag of the adapter.
>
> The quality_report_supported flag could be used by the bluetoothd
> to determine if the quality report feature can be enabled.
>
> Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
> ---
>
> (no changes since v1)
>
>  src/adapter.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/src/adapter.c b/src/adapter.c
> index 98fc78f1e..e2873de46 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -284,6 +284,7 @@ struct btd_adapter {
>         bool is_default;                /* true if adapter is default one */
>
>         bool le_simult_roles_supported;
> +       bool quality_report_supported;
>  };
>
>  typedef enum {
> @@ -9234,6 +9235,12 @@ static const uint8_t le_simult_central_peripheral_uuid[16] = {
>         0x96, 0x46, 0xc0, 0x42, 0xb5, 0x10, 0x1b, 0x67,
>  };
>
> +/* 330859bc-7506-492d-9370-9a6f0614037f */
> +static const uint8_t quality_report_uuid[16] = {
> +       0x7f, 0x03, 0x14, 0x06, 0x6f, 0x9a, 0x70, 0x93,
> +       0x2d, 0x49, 0x06, 0x75, 0xbc, 0x59, 0x08, 0x33,
> +};
> +

Please add support for decoding the new UUID on src/shared/util.c
first so the likes of btmon/bluetoothctl can properly print it.

>  /* 15c0a148-c273-11ea-b3de-0242ac130004 */
>  static const uint8_t rpa_resolution_uuid[16] = {
>         0x04, 0x00, 0x13, 0xac, 0x42, 0x02, 0xde, 0xb3,
> @@ -9276,6 +9283,14 @@ static void le_simult_central_peripheral_func(struct btd_adapter *adapter,
>         adapter->le_simult_roles_supported = flags & 0x01;
>  }
>
> +static void quality_report_func(struct btd_adapter *adapter, uint32_t flags)
> +{
> +       adapter->quality_report_supported = le32_to_cpu(flags) & 0x01;
> +
> +       btd_info(adapter->dev_id, "quality_report_supported %d",
> +                       adapter->quality_report_supported);
> +}
> +
>  static void set_rpa_resolution_complete(uint8_t status, uint16_t len,
>                                         const void *param, void *user_data)
>  {
> @@ -9313,6 +9328,7 @@ static const struct exp_feat {
>         EXP_FEAT(debug_uuid, exp_debug_func),
>         EXP_FEAT(le_simult_central_peripheral_uuid,
>                  le_simult_central_peripheral_func),
> +       EXP_FEAT(quality_report_uuid, quality_report_func),
>         EXP_FEAT(rpa_resolution_uuid, rpa_resolution_func),
>  };
>
> --
> 2.32.0.93.g670b81a890-goog
>


-- 
Luiz Augusto von Dentz

  reply	other threads:[~2021-06-29 20:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29  7:47 [BlueZ PATCH v5 1/3] monitor: add new Intel extended telemetry events Joseph Hwang
2021-06-29  7:47 ` [BlueZ PATCH v5 2/3] adapter: read quality report feature Joseph Hwang
2021-06-29 20:27   ` Luiz Augusto von Dentz [this message]
2021-06-29  7:47 ` [BlueZ PATCH v5 3/3] adapter: set " Joseph Hwang
2021-06-29 20:25   ` Luiz Augusto von Dentz
2021-06-29  8:40 ` [BlueZ,v5,1/3] monitor: add new Intel extended telemetry events bluez.test.bot
2021-07-13  2:08 ` [BlueZ PATCH v5 1/3] " Joseph Hwang
2021-07-14 22:21   ` Luiz Augusto von Dentz
2021-07-15 10:00     ` Joseph Hwang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABBYNZJsH_2HJXOMj7gbsKDuXwMnx+WOR7i8MiL3a_NtDu5WLA@mail.gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=chromeos-bluetooth-upstreaming@chromium.org \
    --cc=josephsih@chromium.org \
    --cc=josephsih@google.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=mcchou@chromium.org \
    --cc=pali@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).