All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vikrampal <vikram.pal@samsung.com>
To: 'Luiz Augusto von Dentz' <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org,
	'Dmitry Kasatkin' <d.kasatkin@samsung.com>,
	cpgs@samsung.com
Subject: RE: [PATCH 1/3] monitor: Adjust for ERTM control bytes
Date: Wed, 12 Nov 2014 18:54:29 +0530	[thread overview]
Message-ID: <004d01cffe7c$09e36110$1daa2330$@samsung.com> (raw)
In-Reply-To: <CABBYNZKDBecKc96qmXX6PmGa8o-kc=Y+BRCZUwT=A3NWJR+n6A@mail.gmail.com>

Hi Luiz,

> -----Original Message-----
> From: Luiz Augusto von Dentz [mailto:luiz.dentz@gmail.com]
> Sent: Wednesday, November 12, 2014 5:49 PM
> To: Vikrampal Yadav
> Cc: linux-bluetooth@vger.kernel.org; Dmitry Kasatkin; cpgs@samsung.com
> Subject: Re: [PATCH 1/3] monitor: Adjust for ERTM control bytes
> 
> Hi Vikram,
> 
> On Wed, Nov 12, 2014 at 10:53 AM, Vikrampal Yadav
> <vikram.pal@samsung.com> wrote:
> > 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
> 
> This is probably not enough if we really want to do it right, please check
> tools/parser/l2cap.c:l2cap_ctrl_ext_parse we most likely need to do
> something similar but this time we should actually not pass s-frames to be
> decoded further, only i-frames should contain data relevant to profiles.
> 
> 
> 
> --
> Luiz Augusto von Dentz

Ok, I'll look into that.

Regards,
Vikram


      reply	other threads:[~2014-11-12 13:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='004d01cffe7c$09e36110$1daa2330$@samsung.com' \
    --to=vikram.pal@samsung.com \
    --cc=cpgs@samsung.com \
    --cc=d.kasatkin@samsung.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.