linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "CEE Forostyan, Konstantin" <Konstantin.Forostyan@peiker-cee.de>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: AW: [PATCH] Bluetooth: L2CAP: Fix errors during L2CAP_CREDIT_BASED_CONNECTION_REQ (0x17)
Date: Mon, 4 May 2020 16:12:01 +0000	[thread overview]
Message-ID: <4233257d2fb24d0293c221d4bab65a2d@peiker-cee.de> (raw)
In-Reply-To: <CABBYNZ+eXJJSoQ7CGj9canfQ1eHDMzEKcY6o9GBKzAaErQs6LQ@mail.gmail.com>

Hi Luiz,

Sorry for delay with the answer, I had a day off last Friday.

> so please send them as proper patches
I did this in a sepatare email, hopefully it is correct. This is my first time submitting a kernel patch.

> please ensure l2cap-tester is working.
Unfortunately I didn't find a way to even integrate l2cap-tester into our embedded platform, so I couldn't make any tests with it. Is it a separate tool or something that is integrated into test-runner tool? If yes, the test-runner requires qemu that we don't have.

Best regards,
Konstantin


Von: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Gesendet: Mittwoch, 29. April 2020 19:17
An: CEE Forostyan, Konstantin
Cc: linux-bluetooth@vger.kernel.org
Betreff: Re: [PATCH] Bluetooth: L2CAP: Fix errors during L2CAP_CREDIT_BASED_CONNECTION_REQ (0x17)
    
Hi Konstantin,

On Wed, Apr 29, 2020 at 9:52 AM CEE Forostyan, Konstantin
<Konstantin.Forostyan@peiker-cee.de> wrote:
>
> Hi All,
>
> During Bluetooth qualification tests I found out that Bluetooth stack responds with an error to a correct L2CAP_CREDIT_BASED_CONNECTION_REQ. Please review the 2 bugfixes I made in kernel in order to correct this problem.
>
> Best regards
> Konstantin
>
>
> --- a/net/bluetooth/l2cap_core.c        2020-04-28 18:19:10.481887583 +0200
> +++ b/net/bluetooth/l2cap_core.c        2020-04-28 18:21:41.000000000 +0200
> @@ -5817,7 +5817,7 @@
>         if (!enable_ecred)
>                 return -EINVAL;
>
> -       if (cmd_len < sizeof(*req) || cmd_len - sizeof(*req) % sizeof(u16)) {
> +       if (cmd_len < sizeof(*req) || (cmd_len - sizeof(*req)) % sizeof(u16)) {
>                 result = L2CAP_CR_LE_INVALID_PARAMS;
>                 goto response;
>         }
> @@ -5855,7 +5855,7 @@
>         }
>
>         result = L2CAP_CR_LE_SUCCESS;
> -       cmd_len -= sizeof(req);
> +       cmd_len -= sizeof(*req);
>         num_scid = cmd_len / sizeof(u16);
>
>         for (i = 0; i < num_scid; i++) {

Weird that I didn't run into this when creating the test for
l2cap-tester, they look correct though so please send them as proper
patches so we can apply to bluetooth-next, also please ensure
l2cap-tester is working.

-- 
Luiz Augusto von Dentz

    

      reply	other threads:[~2020-05-04 16:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 10:45 How to to get L2CAP Enhanced Credit Based Mode working? CEE Forostyan, Konstantin
2020-04-21 12:42 ` Ryll, Jan (GED-SDD2)
2020-04-21 12:56   ` AW: " CEE Forostyan, Konstantin
2020-04-29 16:48     ` [PATCH] Bluetooth: L2CAP: Fix errors during L2CAP_CREDIT_BASED_CONNECTION_REQ (0x17) CEE Forostyan, Konstantin
2020-04-29 17:17       ` Luiz Augusto von Dentz
2020-05-04 16:12         ` CEE Forostyan, Konstantin [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=4233257d2fb24d0293c221d4bab65a2d@peiker-cee.de \
    --to=konstantin.forostyan@peiker-cee.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).