From patchwork Mon Aug 16 14:29:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mariusz Skamra X-Patchwork-Id: 497711 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, UNWANTED_LANGUAGE_BODY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3026CC4338F for ; Mon, 16 Aug 2021 14:30:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04DC460F39 for ; Mon, 16 Aug 2021 14:30:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231648AbhHPOai (ORCPT ); Mon, 16 Aug 2021 10:30:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbhHPOai (ORCPT ); Mon, 16 Aug 2021 10:30:38 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD0A7C061764 for ; Mon, 16 Aug 2021 07:30:05 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id k5so7007494lfu.4 for ; Mon, 16 Aug 2021 07:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codecoup-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1FTyxWhF82ipYTsVFvJpZeL/btz8Utu8BJqwqEetVps=; b=mmI+UFoV9f7c90wdinSV6fXqEoOiWPXVBSN9S5rMejHsUnifKhAfAgao33FwfN8DUn /l2UFb+tzb9lFoQfC+NNsP8wc5lktwHdKgH3aClFsz3nPk8nxCmzi4Z59+mjUt52TobT NKq8bw/HT7Dw4a96cnTbvsHwhQkSZdI5AxQRu5tg26PpeyKqqRj23iGOT57Qo6i4y7+z Mvby0ZKD6FcYM7QEHRYB6PfMeYyZbNXKxKX3YYJugkr4f9qwz5vnFFD6Xf7qHlJLxY1f cvKgxY/26hBmCITwIzLzftDgER+Idxa1+EznClxvFIRu4lfg8wjoWK6sVKp0oVUbFSKR yAmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1FTyxWhF82ipYTsVFvJpZeL/btz8Utu8BJqwqEetVps=; b=X3+jfVtD7F6bTTaiiEBmH+vAyd8yzv1ZuZbBmBlEKGoq2jgxZ9HcVanglgBjN/3Xc4 TjpI/YJ4s5IwVOAtsa00q018MAlP4mpH87oIn8It9FTlpVd38QaCvdoY+AALPYFulEBn LC5v6hYRmhj6j5mLJjSKZlpoj4E1omJ2KRhrSCFF8L8BGpiari4O/UbEYAi8+QzgN4k0 HgThnfPnvk7klmeu9fcHNpyrSRardk6zp8QxV3GFpar8WO/eY/ILK1a69xjm5qhpLE9J 5tBn2fhsGNesu117ttTsv7p3pEPrSp8LgqMUw9FBCN5lqk74KHeHgwjFHPz2lf+XPodp ybhA== X-Gm-Message-State: AOAM530eUYuU0jD/bbW/f7ocdxhos6Tic4vtvRFipfmCh2wljbFOUz5K 7dKEsGSEbnlIm+yBLLlLwPdhjBpa1x0ErQ== X-Google-Smtp-Source: ABdhPJy+5sCc8zpQtRnFKV9rA3LAj3xNDqL75u2fvlF31sE++3QtP94O1GJ9EFWkvLQhQ7/tLZcEOg== X-Received: by 2002:a05:6512:2210:: with SMTP id h16mr2910996lfu.621.1629124203985; Mon, 16 Aug 2021 07:30:03 -0700 (PDT) Received: from localhost.localdomain ([95.143.243.62]) by smtp.gmail.com with ESMTPSA id t142sm959619lff.269.2021.08.16.07.30.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Aug 2021 07:30:03 -0700 (PDT) From: mariusz.skamra@codecoup.pl To: linux-bluetooth@vger.kernel.org Cc: Mariusz Skamra Subject: [PATCH 1/2] monitor: Fix Maximum PDU type in CIS Test Param Date: Mon, 16 Aug 2021 16:29:55 +0200 Message-Id: <20210816142956.1690272-1-mariusz.skamra@codecoup.pl> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Mariusz Skamra The Maximum PDU in CIS Test parameters is 2 byte value. --- monitor/bt.h | 4 ++-- monitor/packet.c | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/monitor/bt.h b/monitor/bt.h index 738bc294b..0bc5718a0 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -2681,8 +2681,8 @@ struct bt_hci_cis_params_test { uint8_t nse; uint16_t m_sdu; uint16_t s_sdu; - uint8_t m_pdu; - uint8_t s_pdu; + uint16_t m_pdu; + uint16_t s_pdu; uint8_t m_phy; uint8_t s_phy; uint8_t m_bn; diff --git a/monitor/packet.c b/monitor/packet.c index 025b7e9b0..210c03259 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -8063,12 +8063,14 @@ static void print_cis_params_test(const void *data, int i) print_field("CIS ID: 0x%2.2x", cis->cis_id); print_field("NSE: 0x%2.2x", cis->nse); - print_field("Master to Slave Maximum SDU: 0x%4.4x", cis->m_sdu); + print_field("Master to Slave Maximum SDU: 0x%4.4x", + le16_to_cpu(cis->m_sdu)); print_field("Slave to Master Maximum SDU: 0x%4.4x", le16_to_cpu(cis->s_sdu)); - print_field("Master to Slave Maximum PDU: 0x%2.2x", + print_field("Master to Slave Maximum PDU: 0x%4.4x", le16_to_cpu(cis->m_pdu)); - print_field("Slave to Master Maximum PDU: 0x%2.2x", cis->s_pdu); + print_field("Slave to Master Maximum PDU: 0x%4.4x", + le16_to_cpu(cis->s_pdu)); print_le_phy("Master to Slave PHY", cis->m_phy); print_le_phy("Slave to Master PHY", cis->s_phy); print_field("Master to Slave Burst Number: 0x%2.2x", cis->m_bn); From patchwork Mon Aug 16 14:29:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mariusz Skamra X-Patchwork-Id: 498207 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F6F4C4338F for ; Mon, 16 Aug 2021 14:30:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6226A60FC3 for ; Mon, 16 Aug 2021 14:30:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231995AbhHPOal (ORCPT ); Mon, 16 Aug 2021 10:30:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbhHPOak (ORCPT ); Mon, 16 Aug 2021 10:30:40 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BB96C061764 for ; Mon, 16 Aug 2021 07:30:09 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id c12so14478114ljr.5 for ; Mon, 16 Aug 2021 07:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codecoup-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0XPd3kE3S+5kYRIU9mJV1XHj/UDJkpccxP0oA/GqjDo=; b=HpEytukT5MCNJaCisOD6tYgT/tBkz1yvEn6sWHXehDVrT3YmjwuOBQkG4nFu+SVNIl fDKenlYPJRBk5435wFKpw3fGXDdsiX9kBAzDPjCUurFRhKaXUUhcfpxBux0ejenGi6i/ wDRQfdVDHSOxtXC16pU5RFrNHjtmcvcbJiTYEZVCQdYyQ5EG6EmmAKMok7OT11JVRj4e dAU2+7/NPuaOXTgnBWpZBqTW8P3x6HFZWb9Gsh3tmiaHu/fp5Z+OPYMYkC9CzvXCj6Fy qSymjFPPU4ZWdj9WUclqVNgpH323GfjLAoihLKmzu8qmhBGqzJVdFh3utf4p717Z5mUv 3/qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0XPd3kE3S+5kYRIU9mJV1XHj/UDJkpccxP0oA/GqjDo=; b=kUJvoLqG1dTiA6slVu6YyMOULHF860VfK2jpvYAXOrI1zo+wcy7r9m3jMNKYRypZcG nDWgeeTFVcEAfq9Vrdc0XbF+8ZDpIJCbo4TMbZ/yAXa1esvE+qubkDfAskQ0MKWpQykf 2NXZjDBqVpcJKQnrY6Q+VFHtMnhi3KqdCbIpO9BR2IiDF07YfhA7biuabhxUoe2rpBa7 pGPKPmKRgWmYZcr/2AiVs6yqn9vR2D+joX3R2QLUXHoueZg4eeMgtoc1mB+iNQZBB1Ma c7I5WV5c3DV3KkZKR9JZlnewFa+J4X62viL/8iPUXDEmJ5BFhm4NocpIwjAJ+hVLP7tQ 91tw== X-Gm-Message-State: AOAM530wAOmAZzDUFLZNwI1u7i5Tb6qzYBa/KUMr+ey8Pf0VAuUth74m 56KWD4JnUSAWCedokITT4OLfgFPUW1586Q== X-Google-Smtp-Source: ABdhPJy+WiyoHoNMhuS0NyQ0zmYCdBK6DYHsqPhm0IJoHTMl2+WXqczsbmOs6MpqktkRAp6t8m6ICg== X-Received: by 2002:a2e:95c1:: with SMTP id y1mr12809596ljh.71.1629124207405; Mon, 16 Aug 2021 07:30:07 -0700 (PDT) Received: from localhost.localdomain ([95.143.243.62]) by smtp.gmail.com with ESMTPSA id t142sm959619lff.269.2021.08.16.07.30.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Aug 2021 07:30:07 -0700 (PDT) From: mariusz.skamra@codecoup.pl To: linux-bluetooth@vger.kernel.org Cc: Mariusz Skamra Subject: [PATCH 2/2] monitor: Fix logging of CIG Test SDU Interval param Date: Mon, 16 Aug 2021 16:29:56 +0200 Message-Id: <20210816142956.1690272-2-mariusz.skamra@codecoup.pl> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210816142956.1690272-1-mariusz.skamra@codecoup.pl> References: <20210816142956.1690272-1-mariusz.skamra@codecoup.pl> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Mariusz Skamra This fixes log of SDU interval in StoM direction. --- monitor/packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/packet.c b/monitor/packet.c index 210c03259..74d9a87a3 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -8083,7 +8083,7 @@ static void le_set_cig_params_test_cmd(const void *data, uint8_t size) print_field("CIG ID: 0x%2.2x", cmd->cig_id); print_usec_interval("Master to Slave SDU Interval", cmd->m_interval); - print_usec_interval("Master to Slave SDU Interval", cmd->s_interval); + print_usec_interval("Slave to Master SDU Interval", cmd->s_interval); print_field("Master to Slave Flush Timeout: 0x%2.2x", cmd->m_ft); print_field("Slave to Master Flush Timeout: 0x%2.2x", cmd->s_ft); print_field("ISO Interval: %.2f ms (0x%4.4x)",