All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tedd Ho-Jeong An <hj.tedd.an@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [BlueZ v2] monitor: Add Intel read supported VS features command
Date: Fri, 16 Apr 2021 17:34:46 -0700	[thread overview]
Message-ID: <20210417003446.628078-1-hj.tedd.an@gmail.com> (raw)
In-Reply-To: <Tedd Ho-Jeong An <tedd.an@intel.com>

From: Tedd Ho-Jeong An <tedd.an@intel.com>

< HCI Command: Intel Read Supported VS Features (0x3f|0x00a6) plen 1
        Page: 0x01
> HCI Event: Command Complete (0x0e) plen 22
      Intel Read Supported VS Features (0x3f|0x00a6) ncmd 1
        Status: Success (0x00)
        Page: 0x01
        Max Pages: 0x02
        Supported Features:
        1f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
---
 monitor/intel.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/monitor/intel.c b/monitor/intel.c
index 18840f3e7..38ce23b99 100644
--- a/monitor/intel.c
+++ b/monitor/intel.c
@@ -471,6 +471,26 @@ static void memory_write_cmd(const void *data, uint8_t size)
 	packet_hexdump(data + 6, size - 6);
 }
 
+static void read_supported_vs_features_cmd(const void *data, uint8_t size)
+{
+	uint8_t page = get_u8(data);
+
+	print_field("Page: 0x%2.2x", page);
+}
+
+static void read_supported_vs_features_rsp(const void *data, uint8_t size)
+{
+	uint8_t status = get_u8(data);
+	uint8_t page = get_u8(data + 1);
+	uint8_t max_pages = get_u8(data + 2);
+
+	print_status(status);
+	print_field("Page: 0x%2.2x", page);
+	print_field("Max Pages: 0x%2.2x", max_pages);
+	print_field("Supported Features:");
+	packet_hexdump(data + 3, size - 3);
+}
+
 static const struct vendor_ocf vendor_ocf_table[] = {
 	{ 0x001, "Reset",
 			reset_cmd, 8, true,
@@ -533,6 +553,10 @@ static const struct vendor_ocf vendor_ocf_table[] = {
 	{ 0x08e, "Memory Write",
 			memory_write_cmd, 6, false,
 			status_rsp, 1, true },
+	{ 0x0a6, "Read Supported VS Features",
+			read_supported_vs_features_cmd, 1, true,
+			read_supported_vs_features_rsp, 19, true },
+
 	{ }
 };
 
-- 
2.25.1


  parent reply	other threads:[~2021-04-17  0:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Tedd Ho-Jeong An <tedd.an@intel.com>
2021-04-14  4:38 ` [BlueZ] monitor: Fix the incorrect vendor name Tedd Ho-Jeong An
2021-04-14  5:07   ` bluez.test.bot
2021-04-14 10:08   ` Marcel Holtmann
2021-04-15  2:25     ` An, Tedd
2021-04-15  3:47       ` Archie Pusaka
2021-04-15  4:34         ` Tedd Ho-Jeong An
2021-04-16  5:23         ` Marcel Holtmann
2021-04-15  1:48 ` [RFC BlueZ v2] " Tedd Ho-Jeong An
2021-04-15  2:35   ` [RFC,BlueZ,v2] " bluez.test.bot
2021-04-16  5:56 ` [BlueZ PATCH] monitor: Update manpage Tedd Ho-Jeong An
2021-04-16  6:43   ` [BlueZ] " bluez.test.bot
2021-04-16 20:06 ` [BlueZ PATCH] monitor: Add Intel read supported VS features command Tedd Ho-Jeong An
2021-04-16 20:39   ` [BlueZ] " bluez.test.bot
2021-04-17  0:34 ` Tedd Ho-Jeong An [this message]
2021-04-17  1:30   ` [BlueZ,v2] " bluez.test.bot
2021-04-19 13:01   ` [BlueZ v2] " Marcel Holtmann

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=20210417003446.628078-1-hj.tedd.an@gmail.com \
    --to=hj.tedd.an@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.