From 1d703e4b10e05e7df85cf0873539e467ae6906d0 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 11 Nov 2005 20:58:36 +0000 Subject: [PATCH] hcidump: Add decoding for hold mode, sniff mode and park state requests --- tools/parser/hci.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tools/parser/hci.c b/tools/parser/hci.c index ed72af324..d4f90a4bd 100644 --- a/tools/parser/hci.c +++ b/tools/parser/hci.c @@ -694,6 +694,25 @@ static inline void read_remote_ext_features_dump(int level, struct frame *frm) printf("handle %d page %d\n", btohs(cp->handle), cp->page_num); } +static inline void hold_mode_dump(int level, struct frame *frm) +{ + hold_mode_cp *cp = frm->ptr; + + p_indent(level, frm); + printf("handle %d max %d min %d\n", btohs(cp->handle), + btohs(cp->max_interval), btohs(cp->min_interval)); +} + +static inline void sniff_mode_dump(int level, struct frame *frm) +{ + sniff_mode_cp *cp = frm->ptr; + + p_indent(level, frm); + printf("handle %d max %d min %d attempt %d timeout %d\n", + btohs(cp->handle), btohs(cp->max_interval), + btohs(cp->min_interval), btohs(cp->attempt), btohs(cp->timeout)); +} + static inline void write_link_policy_dump(int level, struct frame *frm) { write_link_policy_cp *cp = frm->ptr; @@ -1043,6 +1062,13 @@ static inline void command_dump(int level, struct frame *frm) case OGF_LINK_POLICY: switch (ocf) { + case OCF_HOLD_MODE: + case OCF_PARK_MODE: + hold_mode_dump(level + 1, frm); + return; + case OCF_SNIFF_MODE: + sniff_mode_dump(level + 1, frm); + return; case OCF_EXIT_SNIFF_MODE: case OCF_EXIT_PARK_MODE: case OCF_ROLE_DISCOVERY: -- 2.47.3