Diff between 749316cb565ef66f1d9470da5f96f36a56223659 and 2e4902a145b94602ce0bbf653c3388b3cb6a0273

Changed Files

File Additions Deletions Status
tools/parser/lmp.c +28 -4 modified

Full Patch

diff --git a/tools/parser/lmp.c b/tools/parser/lmp.c
index d88d274..2d29252 100644
--- a/tools/parser/lmp.c
+++ b/tools/parser/lmp.c
@@ -308,6 +308,10 @@ static char *opcode2str(uint16_t opcode)
 		return "channel_classification_req";
 	case 127 + (17 << 7):
 		return "channel_classification";
+	case 127 + (21 << 7):
+		return "sniff_subrate_req";
+	case 127 + (22 << 7):
+		return "sniff_subrate_res";
 	default:
 		return "unknown";
 	}
@@ -960,13 +964,13 @@ static inline void channel_classification_req_dump(int level, struct frame *frm)
 	uint16_t max = LMP_U16(frm);
 
 	p_indent(level, frm);
-	printf("AFH_reporting_mode %d\n", mode);
+	printf("AFH reporting mode %d\n", mode);
 
 	p_indent(level, frm);
-	printf("AFH_min_interval 0x%4.4x\n", min);
+	printf("AFH min interval 0x%4.4x\n", min);
 
 	p_indent(level, frm);
-	printf("AFH_max_interval 0x%4.4x\n", max);
+	printf("AFH max interval 0x%4.4x\n", max);
 }
 
 static inline void channel_classification_dump(int level, struct frame *frm)
@@ -978,12 +982,28 @@ static inline void channel_classification_dump(int level, struct frame *frm)
 	frm->len -= 10;
 
 	p_indent(level, frm);
-	printf("AFH_channel_classification 0x");
+	printf("AFH channel classification 0x");
 	for (i = 0; i < 10; i++)
 		printf("%2.2x", map[i]);
 	printf("\n");
 }
 
+static inline void sniff_subrate_dump(int level, struct frame *frm)
+{
+	uint8_t subrate = LMP_U8(frm);
+	uint16_t timeout = LMP_U16(frm);
+	uint32_t instant = LMP_U32(frm);
+
+	p_indent(level, frm);
+	printf("max subrate %d\n", subrate);
+
+	p_indent(level, frm);
+	printf("min subrate zero timeout %d\n", timeout);
+
+	p_indent(level, frm);
+	printf("subrate instant 0x%4.4x\n", instant);
+}
+
 void lmp_dump(int level, struct frame *frm)
 {
 	uint8_t tmp, tid;
@@ -1171,6 +1191,10 @@ void lmp_dump(int level, struct frame *frm)
 	case 127 + (17 << 7):
 		channel_classification_dump(level + 1, frm);
 		return;
+	case 127 + (21 << 7):
+	case 127 + (22 << 7):
+		sniff_subrate_dump(level + 1, frm);
+		return;
 	}
 
 	raw_dump(level, frm);