Linux bluetooth development
 help / color / mirror / Atom feed
From: Tedd Ho-Jeong An <tedd.an@linux.intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: Tedd Ho-Jeong An <tedd.an@intel.com>
Subject: [PATCH BlueZ] monitor: Fix printing params for HCI Intel DDC command
Date: Wed, 13 Jun 2018 12:52:18 -0700	[thread overview]
Message-ID: <1528919538-26014-1-git-send-email-tedd.an@linux.intel.com> (raw)

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

The offset of value for HCI Intel DDC command is incorrect.
HCI Intel DDC parameter has a combination of following structure:

struct intel_ddc {
	u8  len;
	u16 id;
	u8  *value;
}

The offset of value should be sum of len and id which is 3.
---
 monitor/intel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/monitor/intel.c b/monitor/intel.c
index ce624be..4cd1788 100644
--- a/monitor/intel.c
+++ b/monitor/intel.c
@@ -437,7 +437,7 @@ static void ddc_config_write_cmd(const void *data, uint8_t size)
 		uint16_t param_id = get_le16(data + 1);
 
 		print_field("Identifier: 0x%4.4x", param_id);
-		packet_hexdump(data + 2, param_len - 2);
+		packet_hexdump(data + 3, param_len - 2);
 
 		data += param_len + 1;
 		size -= param_len + 1;
-- 
2.7.4


             reply	other threads:[~2018-06-13 19:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-13 19:52 Tedd Ho-Jeong An [this message]
2018-06-15  6:41 ` [PATCH BlueZ] monitor: Fix printing params for HCI Intel DDC command 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=1528919538-26014-1-git-send-email-tedd.an@linux.intel.com \
    --to=tedd.an@linux.intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=tedd.an@intel.com \
    /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