From: "André Dieb Martins" <andre.dieb@signove.com>
To: linux-bluetooth@vger.kernel.org
Cc: "André Dieb Martins" <andre.dieb@signove.com>
Subject: [PATCH 1/2] Fix time intervals dumping of LE commands.
Date: Mon, 24 Jan 2011 16:32:38 -0300 [thread overview]
Message-ID: <1295897559-5540-1-git-send-email-andre.dieb@signove.com> (raw)
Add missing btohs() convertions and spec. constants for converting time
intervals for LE Set Scan Parameters and LE Set Advertising Parameters.
---
parser/hci.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/parser/hci.c b/parser/hci.c
index d9bac9b..41a19b4 100644
--- a/parser/hci.c
+++ b/parser/hci.c
@@ -1582,7 +1582,8 @@ static inline void le_set_advertising_parameters_dump(int level, struct frame *f
le_set_advertising_parameters_cp *cp = frm->ptr;
p_indent(level, frm);
- printf("min 0x%04xms max 0x%04xms\n", cp->min_interval, cp->max_interval);
+ printf("min %.3fms, max %.3fms\n", btohs(cp->min_interval) * 0.625,
+ btohs(cp->max_interval) * 0.625);
p_indent(level, frm);
printf("type 0x%02x (%s) ownbdaddr 0x%02x (%s)\n", cp->advtype,
@@ -1608,7 +1609,8 @@ static inline void le_set_scan_parameters_dump(int level, struct frame *frm)
cp->type == 0x00 ? "passive" : "active");
p_indent(level, frm);
- printf("interval %04xms window %04xms\n", cp->interval, cp->window);
+ printf("interval %.3fms window %.3fms\n", btohs(cp->interval) * 0.625,
+ btohs(cp->window) * 0.625);
p_indent(level, frm);
printf("own address: 0x%02x (%s) policy: %s\n", cp->own_bdaddr_type,
--
1.7.1
next reply other threads:[~2011-01-24 19:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-24 19:32 André Dieb Martins [this message]
2011-01-24 19:32 ` [PATCH 2/2] Implement dumping for evnet LE Connection Update Complete André Dieb Martins
2011-01-31 8:36 ` Johan Hedberg
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=1295897559-5540-1-git-send-email-andre.dieb@signove.com \
--to=andre.dieb@signove.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