linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v2 2/6] monitor: Add decoding support for HCI LE Set Host Feature
Date: Thu, 23 Apr 2020 14:54:57 -0700	[thread overview]
Message-ID: <20200423215501.427266-2-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20200423215501.427266-1-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This adds decoding support for LE Set Host Feature.
---
 monitor/packet.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/monitor/packet.c b/monitor/packet.c
index 038dd6d17..777a52205 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -8128,6 +8128,21 @@ static void le_req_peer_sca_cmd(const void *data, uint8_t size)
 	print_field("Connection Handle: %d", le16_to_cpu(cmd->handle));
 }
 
+static void le_set_host_feature_cmd(const void *data, uint8_t size)
+{
+	const struct bt_hci_cmd_le_set_host_feature *cmd = data;
+	uint64_t mask;
+
+	print_field("Bit Number:");
+
+	mask = print_bitfield(2, cmd->bit_number, features_le);
+	if (mask)
+		print_text(COLOR_UNKNOWN_FEATURE_BIT, "  Unknown features "
+						"(0x%16.16" PRIx64 ")", mask);
+
+	print_field("Bit Value: %u", cmd->bit_value);
+}
+
 struct opcode_data {
 	uint16_t opcode;
 	int bit;
@@ -9041,6 +9056,10 @@ static const struct opcode_data opcode_table[] = {
 	{ BT_HCI_CMD_LE_ISO_TEST_END, BT_HCI_BIT_LE_ISO_TEST_END,
 				"LE Isochronous Read Test Counters", NULL, 0,
 				false },
+	{ BT_HCI_CMD_LE_SET_HOST_FEATURE, BT_HCI_BIT_LE_SET_HOST_FEATURE,
+				"LE Set Host Feature", le_set_host_feature_cmd,
+				sizeof(struct bt_hci_cmd_le_set_host_feature),
+				true, status_rsp, 1, true },
 	{ }
 };
 
-- 
2.25.3


  reply	other threads:[~2020-04-23 21:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 21:54 [PATCH v2 1/6] monitor: Remove use of base defines for 5.2 Luiz Augusto von Dentz
2020-04-23 21:54 ` Luiz Augusto von Dentz [this message]
2020-04-23 21:54 ` [PATCH v2 3/6] emulator: Fix version number of ISO related features Luiz Augusto von Dentz
2020-04-23 21:54 ` [PATCH v2 4/6] emulator: Add support for LE Set Host Feature Luiz Augusto von Dentz
2020-04-23 21:55 ` [PATCH v2 5/6] emulator: Add support for LE Setup ISO Data Path Luiz Augusto von Dentz
2020-04-23 21:55 ` [PATCH v2 6/6] emulator: Add support for LE Remove " Luiz Augusto von Dentz
2020-04-24 17:50 ` [PATCH v2 1/6] monitor: Remove use of base defines for 5.2 Luiz Augusto von Dentz

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=20200423215501.427266-2-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.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).