* [PATCH BlueZ] monitor: Fix printing params for HCI Intel DDC command
@ 2018-06-13 19:52 Tedd Ho-Jeong An
2018-06-15 6:41 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 2+ messages in thread
From: Tedd Ho-Jeong An @ 2018-06-13 19:52 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Tedd Ho-Jeong An
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH BlueZ] monitor: Fix printing params for HCI Intel DDC command
2018-06-13 19:52 [PATCH BlueZ] monitor: Fix printing params for HCI Intel DDC command Tedd Ho-Jeong An
@ 2018-06-15 6:41 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2018-06-15 6:41 UTC (permalink / raw)
To: Tedd Ho-Jeong An; +Cc: linux-bluetooth@vger.kernel.org, Tedd Ho-Jeong An
Hi Tedd,
On Wed, Jun 13, 2018 at 10:52 PM, Tedd Ho-Jeong An
<tedd.an@linux.intel.com> wrote:
> 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
Applied, thanks.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-15 6:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-13 19:52 [PATCH BlueZ] monitor: Fix printing params for HCI Intel DDC command Tedd Ho-Jeong An
2018-06-15 6:41 ` Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox