Diff between 4665be2e3f13720f74aba9916870ed06f00c284a and 37fe15255ac568ab7d7b7fad2d7fa2ecf6c8f4d8

Changed Files

File Additions Deletions Status
tools/parser/ericsson.c +36 -0 added
tools/parser/hci.c +12 -1 modified
tools/parser/parser.h +2 -0 modified

Full Patch

diff --git a/tools/parser/ericsson.c b/tools/parser/ericsson.c
new file mode 100644
index 0000000..eea18aa
--- /dev/null
+++ b/tools/parser/ericsson.c
@@ -0,0 +1,36 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2004-2006  Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it 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.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+
+#include "parser.h"
+
+void ericsson_dump(int level, struct frame *frm)
+{
+	raw_dump(level, frm);
+}
diff --git a/tools/parser/hci.c b/tools/parser/hci.c
index 9a4b265..96ef17c 100644
--- a/tools/parser/hci.c
+++ b/tools/parser/hci.c
@@ -2431,13 +2431,24 @@ static inline void event_dump(int level, struct frame *frm)
 		p_indent(level, frm);
 		printf("HCI Event: Testing (0x%2.2x) plen %d\n", hdr->evt, hdr->plen);
 	} else if (hdr->evt == EVT_VENDOR) {
+		uint16_t manufacturer;
+
 		if (parser.flags & DUMP_NOVENDOR)
 			return;
 
 		p_indent(level, frm);
 		printf("HCI Event: Vendor (0x%2.2x) plen %d\n", hdr->evt, hdr->plen);
 
-		if (get_manufacturer() == 10) {
+		manufacturer = get_manufacturer();
+
+		switch (manufacturer) {
+		case 0:
+		case 48:
+			frm->ptr += HCI_EVENT_HDR_SIZE;
+			frm->len -= HCI_EVENT_HDR_SIZE;
+			ericsson_dump(level + 1, frm);
+			return;
+		case 10:
 			frm->ptr += HCI_EVENT_HDR_SIZE;
 			frm->len -= HCI_EVENT_HDR_SIZE;
 			csr_dump(level + 1, frm);
diff --git a/tools/parser/parser.h b/tools/parser/parser.h
index efaadfa..7363c2a 100644
--- a/tools/parser/parser.h
+++ b/tools/parser/parser.h
@@ -80,6 +80,7 @@ struct frame {
 #define FILT_OBEX	0x00010000
 #define FILT_CAPI	0x00020000
 #define FILT_PPP	0x00040000
+#define FILT_ERICSSON	0x10000000
 #define FILT_CSR	0x1000000a
 #define FILT_DGA	0x1000000c
 
@@ -233,6 +234,7 @@ void capi_dump(int level, struct frame *frm);
 void ppp_dump(int level, struct frame *frm);
 void arp_dump(int level, struct frame *frm);
 void ip_dump(int level, struct frame *frm);
+void ericsson_dump(int level, struct frame *frm);
 void csr_dump(int level, struct frame *frm);
 void bpa_dump(int level, struct frame *frm);