Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1811229pxb; Wed, 9 Feb 2022 05:08:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2M/Dh+3PxU5B4MuLjjFgietO9W9703yIUR/x49WtWq38GXQl+KpCaJepg+pvAFO22pcd7 X-Received: by 2002:a63:6c09:: with SMTP id h9mr1879214pgc.234.1644412091671; Wed, 09 Feb 2022 05:08:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644412091; cv=none; d=google.com; s=arc-20160816; b=qpZf2eArAdYBjs5Fuj6s9AKKd2rsODI7CohGCnqisRHWhv68w6ozgBybQ85xK1o4Q7 WFc2fbTXQ/tQf4U24XlbbAhLNY9gf84dQRq+XSLWvZi3ui8OczhNNl+01e2n1NIKHade mnf9S4sTkT3zuoFlRMJUlDTi9vHsPWvHmf58cV0bU1MPpLy3+VZziViXVgCoUYQEkoqB 2v/Ld5T1D0cMjxz7+6u7hiTRI6rYKtak1nhzF4vqhYw9fVzEZa9RuPdAa8dc6H2HlrFI HK3k2usRjmdwzyLFL/khZc17rfgnPvuOFOphAkATyXsL3SUMW9cNzyvjdVVmLy3bygjS qslQ== 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=vZUO0cqlNRIJarZJPiafFiE07Tp9QCPY4gWT3QTXXvQ=; b=nCFotJtinSZOw9BPRpWL3bF2ft1I+pCxN5mSMvP8COiBBymabnjcyezLcCPWWFnEzT wN+pDqfiYBY6vhfYG4MF1QqTB9jm3s04ATht4/M5RjFOWULL75IOSK0gWLO6NFTOrwbv eF9gJy1wo/lCH6Qqiu9Bu8TAqfhJyLF+Hd70m9QHyXdPdphn0EqnA2O/K9LY/RWlSSdf pyRorciyPoAbc75H2FujxKIEceeRxZn5rywb5C/haVPw75XE/Tgqsx7/FxfFOah8D3r8 3dKC7HY0v6ykbHnIiA7e4w2Y/iOcwGdPMIpKVUbH3R8qSurSk9qG/xzpu2ZJpBkHxLIH UkLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=MuP0BGrW; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u16si3957336plf.534.2022.02.09.05.08.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 05:08:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=MuP0BGrW; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7D8DBE0A787E; Wed, 9 Feb 2022 02:35:37 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232204AbiBIJ0I (ORCPT + 99 others); Wed, 9 Feb 2022 04:26:08 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:47982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbiBIJ0H (ORCPT ); Wed, 9 Feb 2022 04:26:07 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF36AE058254 for ; Wed, 9 Feb 2022 01:26:01 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id y17so1691019plg.7 for ; Wed, 09 Feb 2022 01:26:01 -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=vZUO0cqlNRIJarZJPiafFiE07Tp9QCPY4gWT3QTXXvQ=; b=MuP0BGrWdMzNenvaMZIVRsd7fdvLFy+WKwRFeYpCEQR3pedG07OBNa03n3XKM2UoX4 /jmjbqvWlxIvP74qXsU0ZH9VmYRzmExVHKvn2F5a4fFw3r3H9c6ctIzzBTpsH6a/zMLZ xqlaSN0U/3UiW1bGy9Ewy+dxl5zNXE47dFwx4= 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=vZUO0cqlNRIJarZJPiafFiE07Tp9QCPY4gWT3QTXXvQ=; b=NHoUBcs5qwwDchZHdo6VMUzuXCmECm2c7CG/dfiWxo5LDYErPi1LHTul9n9oJcdE9H LgXKSCMg4i8U6d8IfNXUb6FrG3oCT+GvU1wcW4EuNhwnUuDm4Vt/+sGEHC9KDFGXpdgM cbhDLJuR8upnBhXiK0TLVJ+0Ut0vL2q7059hJDAqNUBTaAXXEblDIX0lOp4VjwlVgKDv C5RbBIASjc5BqnYKYXaXyl+4uz74pfrUDZD6icTrQ3obIdrQhjToxJTE1i3e3ibXgzhz XudEjf6XKchDUmdlPu5qyLEv4tymUoXcc6yFZYIFG899V2nF2IO+2OkagheFlTCSYTf4 e6NA== X-Gm-Message-State: AOAM532nBUVWyOZtHjPhiZfkxL7BVhNUlFd2VHp62o0d6QVSYpUprvdZ 4HHcwNKXZAsg3X5/YtWtigy9SH64r9QUjw== X-Received: by 2002:a17:903:2d2:: with SMTP id s18mr1519335plk.56.1644398680996; Wed, 09 Feb 2022 01:24:40 -0800 (PST) Received: from localhost (174.71.80.34.bc.googleusercontent.com. [34.80.71.174]) by smtp.gmail.com with UTF8SMTPSA id g12sm18050158pfm.119.2022.02.09.01.24.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Feb 2022 01:24:40 -0800 (PST) From: Joseph Hwang To: linux-bluetooth@vger.kernel.org, marcel@holtmann.org, luiz.dentz@gmail.com, pali@kernel.org Cc: chromeos-bluetooth-upstreaming@chromium.org, josephsih@google.com, Joseph Hwang Subject: [BlueZ PATCH v3 8/9] tools/btmgmt: fix quality report command Date: Wed, 9 Feb 2022 17:24:13 +0800 Message-Id: <20220209092414.751642-6-josephsih@chromium.org> X-Mailer: git-send-email 2.35.0.263.gb82422642f-goog In-Reply-To: <20220209092414.751642-1-josephsih@chromium.org> References: <20220209092414.751642-1-josephsih@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 set quality report feature becomes a mgmt command and is not included in the experimental features any more. Signed-off-by: Joseph Hwang --- Changes in v3: - This is a new patch that fixes the quality on/off command in btmgmt. tools/btmgmt.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/tools/btmgmt.c b/tools/btmgmt.c index 42ef9acef..4f215b4af 100644 --- a/tools/btmgmt.c +++ b/tools/btmgmt.c @@ -1842,7 +1842,7 @@ static void cmd_exp_privacy(int argc, char **argv) } } -static void exp_quality_rsp(uint8_t status, uint16_t len, const void *param, +static void quality_rsp(uint8_t status, uint16_t len, const void *param, void *user_data) { if (status != 0) @@ -1856,12 +1856,7 @@ static void exp_quality_rsp(uint8_t status, uint16_t len, const void *param, static void cmd_exp_quality(int argc, char **argv) { - /* 330859bc-7506-492d-9370-9a6f0614037f */ - static const uint8_t uuid[16] = { - 0x7f, 0x03, 0x14, 0x06, 0x6f, 0x9a, 0x70, 0x93, - 0x2d, 0x49, 0x06, 0x75, 0xbc, 0x59, 0x08, 0x33, - }; - struct mgmt_cp_set_exp_feature cp; + struct mgmt_cp_set_quality_report cp; uint8_t val; if (mgmt_index == MGMT_INDEX_NONE) { @@ -1878,11 +1873,10 @@ static void cmd_exp_quality(int argc, char **argv) } memset(&cp, 0, sizeof(cp)); - memcpy(cp.uuid, uuid, 16); cp.action = val; - if (mgmt_send(mgmt, MGMT_OP_SET_EXP_FEATURE, mgmt_index, - sizeof(cp), &cp, exp_quality_rsp, NULL, NULL) == 0) { + if (mgmt_send(mgmt, MGMT_OP_SET_QUALITY_REPORT, mgmt_index, + sizeof(cp), &cp, quality_rsp, NULL, NULL) == 0) { error("Unable to send quality report feature cmd"); return bt_shell_noninteractive_quit(EXIT_FAILURE); } @@ -5636,10 +5630,10 @@ static const struct bt_shell_menu main_menu = { cmd_exp_debug, "Set debug feature" }, { "exp-privacy", "", cmd_exp_privacy, "Set LL privacy feature" }, - { "exp-quality", "", cmd_exp_quality, - "Set bluetooth quality report feature" }, { "exp-offload", "", cmd_exp_offload_codecs, "Toggle codec support" }, + { "quality", "", + cmd_exp_quality, "Set bluetooth quality report feature" }, { "read-sysconfig", NULL, cmd_read_sysconfig, "Read System Configuration" }, { "set-sysconfig", "<-v|-h> [options...]", -- 2.35.0.263.gb82422642f-goog