Diff between 7be0d2b3b0a2e32dbdd582180872796c2411bb00 and d4c7714b90c6a953fa6835f2e07cb9ab3d1d7211

Changed Files

File Additions Deletions Status
tools/parser/hci.c +18 -15 modified

Full Patch

diff --git a/tools/parser/hci.c b/tools/parser/hci.c
index 0ac3a99..8dbd5be 100644
--- a/tools/parser/hci.c
+++ b/tools/parser/hci.c
@@ -1014,6 +1014,21 @@ static inline void request_clock_dump(int level, struct frame *frm)
 					cp->which_clock ? "piconet" : "local");
 }
 
+static inline void num_comp_pkts_dump(int level, struct frame *frm)
+{
+	uint8_t num = get_u8(frm);
+	uint16_t handle, packets;
+	int i;
+
+	for (i = 0; i < num; i++) {
+		handle = btohs(htons(get_u16(frm)));
+		packets = btohs(htons(get_u16(frm)));
+
+		p_indent(level, frm);
+		printf("handle %d packets %d\n", handle, packets);
+	}
+}
+
 static inline void command_dump(int level, struct frame *frm)
 {
 	hci_command_hdr *hdr = frm->ptr;
@@ -1198,6 +1213,9 @@ static inline void command_dump(int level, struct frame *frm)
 		case OCF_READ_TRANSMIT_POWER_LEVEL:
 			request_transmit_power_level_dump(level + 1, frm);
 			return;
+		case OCF_HOST_NUM_COMP_PKTS:
+			num_comp_pkts_dump(level + 1, frm);
+			return;
 		case OCF_FLUSH:
 		case OCF_READ_LINK_SUPERVISION_TIMEOUT:
 			generic_command_dump(level + 1, frm);
@@ -2135,21 +2153,6 @@ static inline void role_change_dump(int level, struct frame *frm)
 	}
 }
 
-static inline void num_comp_pkts_dump(int level, struct frame *frm)
-{
-	uint8_t num = get_u8(frm);
-	uint16_t handle, packets;
-	int i;
-
-	for (i = 0; i < num; i++) {
-		handle = btohs(htons(get_u16(frm)));
-		packets = btohs(htons(get_u16(frm)));
-
-		p_indent(level, frm);
-		printf("handle %d packets %d\n", handle, packets);
-	}
-}
-
 static inline void mode_change_dump(int level, struct frame *frm)
 {
 	evt_mode_change *evt = frm->ptr;