From 7c2544bd8426b32aae63f285216b45933e8d9ebc Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Fri, 31 Aug 2012 10:37:20 +0300 Subject: hcidump: Decode Num Completed Data Blocks Adds decoding Number Of Completed Data Blocks Event > HCI Event: Number Of Completed Data Blocks (0x48) plen 9 Total num blocks 4 Num handles 1 Handle 0x0001: Num complt pkts 1 Num complt blks 1 --- tools/parser/hci.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tools/parser/hci.c b/tools/parser/hci.c index 704e80e90..9a4d15fb8 100644 --- a/tools/parser/hci.c +++ b/tools/parser/hci.c @@ -3721,6 +3721,25 @@ static inline void flow_spec_modify_dump(int level, struct frame *frm) } } +static inline void num_completed_blocks_dump(int level, struct frame *frm) +{ + evt_num_completed_blocks *evt = frm->ptr; + int i; + + p_indent(level, frm); + printf("Total num blocks %d Num handles %d\n", + btohs(evt->total_num_blocks), evt->num_handles); + + for (i = 0; i < evt->num_handles; i++) { + cmplt_handle *h = &evt->handles[i]; + + p_indent(level + 1, frm); + printf("Handle 0x%4.4x: Num complt pkts %d Num complt blks %d\n", + btohs(h->handle), btohs(h->num_cmplt_pkts), + btohs(h->num_cmplt_blks)); + } +} + static inline void event_dump(int level, struct frame *frm) { hci_event_hdr *hdr = frm->ptr; @@ -3947,6 +3966,9 @@ static inline void event_dump(int level, struct frame *frm) case EVT_FLOW_SPEC_MODIFY_COMPLETE: flow_spec_modify_dump(level + 1, frm); break; + case EVT_NUMBER_COMPLETED_BLOCKS: + num_completed_blocks_dump(level + 1, frm); + break; default: raw_dump(level, frm); break; -- cgit v1.2.3