All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] monitor: Adjust for ERTM control bytes
@ 2014-11-12  8:53 Vikrampal Yadav
  2014-11-12  8:53 ` [PATCH 2/3] monitor: Fix for GetElementAttributes when AttributeValueLength zero Vikrampal Yadav
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Vikrampal Yadav @ 2014-11-12  8:53 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, d.kasatkin, vikram.pal, cpgs

Adjustment for ERTM control bytes fixed.
---
 monitor/l2cap.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/monitor/l2cap.c b/monitor/l2cap.c
index ebdd20f..b37f20f 100644
--- a/monitor/l2cap.c
+++ b/monitor/l2cap.c
@@ -2621,6 +2621,9 @@ static void l2cap_frame(uint16_t index, bool in, uint16_t handle,
 		connless_packet(index, in, handle, cid, data, size);
 		break;
 	case 0x0003:
+		/* Adjust for ERTM control bytes */
+		data += 2;
+		size -= 2;
 		amp_packet(index, in, handle, cid, data, size);
 		break;
 	case 0x0004:
@@ -2635,6 +2638,9 @@ static void l2cap_frame(uint16_t index, bool in, uint16_t handle,
 	default:
 		l2cap_frame_init(&frame, index, in, handle, cid, data, size);
 
+		if (frame.mode > 0)
+			l2cap_frame_pull(&frame, &frame, 2);
+
 		print_indent(6, COLOR_CYAN, "Channel:", "", COLOR_OFF,
 				" %d len %d [PSM %d mode %d] {chan %d}",
 						cid, size, frame.psm,
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-11-12 13:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12  8:53 [PATCH 1/3] monitor: Adjust for ERTM control bytes Vikrampal Yadav
2014-11-12  8:53 ` [PATCH 2/3] monitor: Fix for GetElementAttributes when AttributeValueLength zero Vikrampal Yadav
2014-11-12  8:53 ` [PATCH 3/3] monitor: Add AVRCP SetBrowsedPlayer support Vikrampal Yadav
2014-11-12 12:18 ` [PATCH 1/3] monitor: Adjust for ERTM control bytes Luiz Augusto von Dentz
2014-11-12 13:24   ` Vikrampal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.