You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

54 lines
2.2 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../bluez-hcidump/0001-Fix-time-intervals-dumping-of-LE-commands.patch
# Copyright (C) 2011 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
From 4299bde37959993cdc81a6e55a2969c8542391e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Dieb=20Martins?= <andre.dieb@signove.com>
Date: Mon, 24 Jan 2011 16:32:38 -0300
Subject: [PATCH 1/6] Fix time intervals dumping of LE commands.
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 f9f01c9..8299403 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.2.3