OpenSDE Packages Database (without history before r20070)
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

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../bluez-hcidump/0001-Fix-time-intervals-dumping-of-LE-commands.patch
  5. # Copyright (C) 2011 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. From 4299bde37959993cdc81a6e55a2969c8542391e1 Mon Sep 17 00:00:00 2001
  17. From: =?UTF-8?q?Andr=C3=A9=20Dieb=20Martins?= <andre.dieb@signove.com>
  18. Date: Mon, 24 Jan 2011 16:32:38 -0300
  19. Subject: [PATCH 1/6] Fix time intervals dumping of LE commands.
  20. Add missing btohs() convertions and spec. constants for converting time
  21. intervals for LE Set Scan Parameters and LE Set Advertising Parameters.
  22. ---
  23. parser/hci.c | 6 ++++--
  24. 1 files changed, 4 insertions(+), 2 deletions(-)
  25. diff --git a/parser/hci.c b/parser/hci.c
  26. index f9f01c9..8299403 100644
  27. --- a/parser/hci.c
  28. +++ b/parser/hci.c
  29. @@ -1582,7 +1582,8 @@ static inline void le_set_advertising_parameters_dump(int level, struct frame *f
  30. le_set_advertising_parameters_cp *cp = frm->ptr;
  31. p_indent(level, frm);
  32. - printf("min 0x%04xms max 0x%04xms\n", cp->min_interval, cp->max_interval);
  33. + printf("min %.3fms, max %.3fms\n", btohs(cp->min_interval) * 0.625,
  34. + btohs(cp->max_interval) * 0.625);
  35. p_indent(level, frm);
  36. printf("type 0x%02x (%s) ownbdaddr 0x%02x (%s)\n", cp->advtype,
  37. @@ -1608,7 +1609,8 @@ static inline void le_set_scan_parameters_dump(int level, struct frame *frm)
  38. cp->type == 0x00 ? "passive" : "active");
  39. p_indent(level, frm);
  40. - printf("interval %04xms window %04xms\n", cp->interval, cp->window);
  41. + printf("interval %.3fms window %.3fms\n", btohs(cp->interval) * 0.625,
  42. + btohs(cp->window) * 0.625);
  43. p_indent(level, frm);
  44. printf("own address: 0x%02x (%s) policy: %s\n", cp->own_bdaddr_type,
  45. --
  46. 1.7.2.3