Received: by 2002:ac2:4468:0:0:0:0:0 with SMTP id y8csp443728lfl; Tue, 15 Feb 2022 07:38:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxq4CzIQgedkyd86LP5A+sTE1wVMGYHIi82x+xjhMJjIj0zg3zl3q0mhiFGJSZVoQsJBDpy X-Received: by 2002:a17:907:86a1:: with SMTP id qa33mr3446857ejc.516.1644939512339; Tue, 15 Feb 2022 07:38:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644939512; cv=none; d=google.com; s=arc-20160816; b=lRxzfByExj+HiMjaipdHOit1Gat5/gc1Q1fVXl7b+qn/nABg/8zzOZNJ99VOcYfyk6 /8Ux1u7B87qzmrhXaBfjmEhsMczHeZcWwnwtzKt9FPE+ukfwFHeZV8hRWOudGlqeCY4a kkbyXU+WJlQpi4XvBwtmay2hENq+ibfrYmuirvwmln4FPNppyA8z4THaUkbHjBkxAsZD mm6OLkJQV2KSYxr01y0Pwb/eL9pEOyEX6wyIIwzjC0IFMrCc8TgktvOwfXWmFpujtNaw B8Y8GemiDqqJUm0zexoY2yEqKKS8DiWYg5lTSk8sSLdPfufcmOOIcMFa36W+d8JCG0IW OiMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=21rCQRiXB46+PABuCyw+4bZoZw/a3puD6LYmvybmjdQ=; b=J1MZS+T51CbHy0ENgarWZ17RA4lopmwY45OK76gkVQz88x0ys4G3Cp7BsFePLUUzie hqpXJ0QAzbvIFAZkgJ+b3JfDJJvL9Go3huQtHsKgNE7LBklsjR002oCslKy49uy6QLnp etMtEtJXYvQkY2nnCvbgAr8kP6RIxL5LxfVZSlCp22KsxXHqhw7FJvsTZcWes3ii6TV6 xBk3AJpx/+mzt7dGGqazIdisGCCwYGnW8A7poE46YulkQsVZJV2cckZy06luM/KwQjzt NyvkMMivajRiGPQ7/hOmlrYepoTDpeQg6Z/e8Law7wq6lKrVI0OYD1Ps4p6nAHwq0M5/ a/iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JR2odJ94; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2si59728edx.265.2022.02.15.07.37.50; Tue, 15 Feb 2022 07:38:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JR2odJ94; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231797AbiBONg5 (ORCPT + 99 others); Tue, 15 Feb 2022 08:36:57 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238283AbiBONg4 (ORCPT ); Tue, 15 Feb 2022 08:36:56 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26F896E8F6 for ; Tue, 15 Feb 2022 05:36:47 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id i21so33437676pfd.13 for ; Tue, 15 Feb 2022 05:36:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=21rCQRiXB46+PABuCyw+4bZoZw/a3puD6LYmvybmjdQ=; b=JR2odJ94fdopH+gQjWdTdqd8pIITZBp7KH6amMqBbyjMT6TkzjT+qBkrmnTDCIGfcU N8LjgQa+EyESx3Au80N87/AwtzKEVANE4cFyMphSXnJ3s6xgbydTTStQ1qqdC0ljPWcm 7UpFwnS+PKv8eZChJofY9ULXiuXVIR6BKIxnA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=21rCQRiXB46+PABuCyw+4bZoZw/a3puD6LYmvybmjdQ=; b=rGsMZE1d+/2NOyFY3tisojJ5yv9L5hv/NtUEWJHOgj+x7EdL9dBNZ+dw55Bfrz+x5a 7qajHZ2RhC7umed2nfFSw9c9pyxp22g9oA/9yIXJw2pXFEuaemi5QrGIVgWkxhMEglwa mk5gZd2MJowkqfBMqxue8Ta6DxbUpIEJPsVUSgTLjzN1UlgisHHnxtrORbGeEr3LatfA QZYGVtO965Up3G0q5QSe/cKEYx+klnPCmWOPf1wwKOk20LTJ0fMrhpj078GdO1CG2Y4u 8+PO5K4wmRVl6IiXTjA0ygxEp9jDsryWF40Eu/mzIV+GxwYcw/dKMyqHHuFJXQTwhsrw FleQ== X-Gm-Message-State: AOAM5312NUvrwI0RERLQNel9W45ylytk609kNC1u4G6U8fcyzSk6DAHw ElVyzXpE30X041EpuiuWofOe+J5OjHKRsw== X-Received: by 2002:a63:b58:: with SMTP id a24mr3556904pgl.537.1644932206468; Tue, 15 Feb 2022 05:36:46 -0800 (PST) Received: from localhost (208.158.221.35.bc.googleusercontent.com. [35.221.158.208]) by smtp.gmail.com with UTF8SMTPSA id x6sm8940389pfo.152.2022.02.15.05.36.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Feb 2022 05:36:46 -0800 (PST) From: Joseph Hwang To: linux-bluetooth@vger.kernel.org, marcel@holtmann.org, luiz.dentz@gmail.com, pali@kernel.org Cc: josephsih@google.com, chromeos-bluetooth-upstreaming@chromium.org, Joseph Hwang Subject: [BlueZ PATCH v4 3/8] adapter: enable quality report via MGMT_OP_SET_QUALITY_REPORT Date: Tue, 15 Feb 2022 21:36:31 +0800 Message-Id: <20220215133636.2827039-3-josephsih@chromium.org> X-Mailer: git-send-email 2.35.1.265.g69c8d7142f-goog In-Reply-To: <20220215133636.2827039-1-josephsih@chromium.org> References: <20220215133636.2827039-1-josephsih@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org The quality report feature is now enabled through MGMT_OP_SET_QUALITY_REPORT instead of through the experimental features. Signed-off-by: Joseph Hwang --- Changes in v4: - Move forward this patch in the patch series so that this command patch is prior to the quality report event patches. Changes in v3: - This is a new patch that enables the quality report feature via MGMT_OP_SET_QUALITY_REPORT. src/adapter.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/adapter.c b/src/adapter.c index eef50f67a..d988865f6 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -120,13 +120,6 @@ static const struct mgmt_exp_uuid le_simult_central_peripheral_uuid = { .str = "671b10b5-42c0-4696-9227-eb28d1b049d6" }; -/* 330859bc-7506-492d-9370-9a6f0614037f */ -static const struct mgmt_exp_uuid quality_report_uuid = { - .val = { 0x7f, 0x03, 0x14, 0x06, 0x6f, 0x9a, 0x70, 0x93, - 0x2d, 0x49, 0x06, 0x75, 0xbc, 0x59, 0x08, 0x33 }, - .str = "330859bc-7506-492d-9370-9a6f0614037f" -}; - /* 15c0a148-c273-11ea-b3de-0242ac130004 */ static const struct mgmt_exp_uuid rpa_resolution_uuid = { .val = { 0x04, 0x00, 0x13, 0xac, 0x42, 0x02, 0xde, 0xb3, @@ -9600,12 +9593,6 @@ static void le_simult_central_peripheral_func(struct btd_adapter *adapter, (void *)le_simult_central_peripheral_uuid.val); } -static void quality_report_func(struct btd_adapter *adapter, uint8_t action) -{ - if (action) - queue_push_tail(adapter->exps, (void *)quality_report_uuid.val); -} - static void set_rpa_resolution_complete(uint8_t status, uint16_t len, const void *param, void *user_data) { @@ -9681,7 +9668,6 @@ 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), EXP_FEAT(&codec_offload_uuid, codec_offload_func), }; @@ -9755,6 +9741,11 @@ static void read_exp_features(struct btd_adapter *adapter) btd_error(adapter->dev_id, "Failed to read exp features info"); } +bool is_quality_report_supported(struct btd_adapter *adapter) +{ + return !!(adapter->supported_settings & MGMT_SETTING_QUALITY_REPORT); +} + static void read_info_complete(uint8_t status, uint16_t length, const void *param, void *user_data) { -- 2.35.1.265.g69c8d7142f-goog